MCPcopy Create free account
hub / github.com/ElementsProject/elements / GenerateTemplateResults

Function GenerateTemplateResults

src/bench/bench.cpp:27–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25namespace {
26
27void GenerateTemplateResults(const std::vector<ankerl::nanobench::Result>& benchmarkResults, const fs::path& file, const char* tpl)
28{
29 if (benchmarkResults.empty() || file.empty()) {
30 // nothing to write, bail out
31 return;
32 }
33 std::ofstream fout{file};
34 if (fout.is_open()) {
35 ankerl::nanobench::render(tpl, benchmarkResults, fout);
36 std::cout << "Created " << file << std::endl;
37 } else {
38 std::cout << "Could not write to file " << file << std::endl;
39 }
40}
41
42} // namespace
43

Callers 1

RunAllMethod · 0.85

Calls 2

renderFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected