void BannerSubBundle(struct Bundle *bp,struct Rlist *params) { CfOut(cf_verbose,"","\n"); CfOut(cf_verbose,""," * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n"); if (VERBOSE || DEBUG) { printf("%s> BUNDLE %s",VPREFIX,bp->name); } if (params && (VERBOSE||DEBUG)) { printf("("); ShowRlist(stdout,params); printf(" )\n"); } else { if (VERBOSE||DEBUG) printf("\n"); } CfOut(cf_verbose,""," * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n"); CfOut(cf_verbose,"","\n"); LastSawBundle(bp->name); }
static int NoteBundleCompliance(const Bundle *bundle, int save_pr_kept, int save_pr_repaired, int save_pr_notkept) { double delta_pr_kept, delta_pr_repaired, delta_pr_notkept; double bundle_compliance = 0.0; delta_pr_kept = (double) (PR_KEPT - save_pr_kept); delta_pr_notkept = (double) (PR_NOTKEPT - save_pr_notkept); delta_pr_repaired = (double) (PR_REPAIRED - save_pr_repaired); if (delta_pr_kept + delta_pr_notkept + delta_pr_repaired <= 0) { CfOut(cf_verbose, "", " ==> Zero promises executed for bundle \"%s\"", bundle->name); return CF_NOP; } CfOut(cf_verbose,""," ==> == Bundle Accounting Summary for \"%s\" ==", bundle->name); CfOut(cf_verbose,""," ==> Promises kept in \"%s\" = %.0lf", bundle->name, delta_pr_kept); CfOut(cf_verbose,""," ==> Promises not kept in \"%s\" = %.0lf", bundle->name, delta_pr_notkept); CfOut(cf_verbose,""," ==> Promises repaired in \"%s\" = %.0lf", bundle->name, delta_pr_repaired); bundle_compliance = (delta_pr_kept + delta_pr_repaired) / (delta_pr_kept + delta_pr_notkept + delta_pr_repaired); CfOut(cf_verbose, "", " ==> Aggregate compliance (promises kept/repaired) for bundle \"%s\" = %.1lf%%", bundle->name, bundle_compliance * 100.0); LastSawBundle(bundle, bundle_compliance); // return the worst case for the bundle status if (delta_pr_notkept > 0) { return CF_FAIL; } if (delta_pr_repaired > 0) { return CF_CHG; } return CF_NOP; }