diff --git a/tools/rad_kbench.cpp b/tools/rad_kbench.cpp index 0b5d154c..5b47d678 100644 --- a/tools/rad_kbench.cpp +++ b/tools/rad_kbench.cpp @@ -358,12 +358,25 @@ int write_report(const std::string& path, const std::vector& rows, std::string s; s += "# radiance kernel libraries\n\n"; - s += "Generated by `rad-kbench`. Every kernel of every loaded library ran on the same " - "inputs" + (benched ? std::string(" and each\ncase that passed was timed in the same " - "run, so correctness, completeness and speed come from " - "one run\n(the Speed section says how the times were " - "taken).\n\n") - : std::string(";\nnothing was timed (`--bench` was not given).\n\n")); + /* The header may claim only what this pass measured. The counts are the same ones the + * Rows nothing ran section prints from this data below; the sentence claiming every + * kernel ran is true only when no declared row was left unreached. */ + size_t declared_rows = 0, reached_rows = 0; + for (const LibRow& l : libs) { declared_rows += l.rows.size(); reached_rows += l.ran.size(); } + const bool all_ran = reached_rows == declared_rows; + s += "Generated by `rad-kbench`. " + + (all_ran + ? std::string("Every kernel of every loaded library ran on the same inputs") + : fmt("%zu of %zu declared kernel rows ran on the same inputs", reached_rows, + declared_rows)) + + (benched ? std::string(" and each\ncase that passed was timed in the same " + "run, so correctness, completeness and speed come from " + "one run\n(the Speed section says how the times were " + "taken).\n\n") + : std::string(";\nnothing was timed (`--bench` was not given).\n\n")); + if (!all_ran) + s += "Rows no case in this pass reached are listed under *Rows nothing ran*; a row " + "there is a gap in\ncoverage, not a failing kernel.\n\n"; s += "- " + provenance + "\n"; if (!arch_plugin.empty()) s += "- architecture plugin: `" + arch_plugin + "`\n"; s += "- libraries: `" + libraries + "`\n";