Skip to content
Snippets Groups Projects
Commit f75abb80 authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Updated benchmark output file to always write to a 'tests' key, making it...

Updated benchmark output file to always write to a 'tests' key, making it easier to detect if a json file contains test results
parent 4c57c003
No related branches found
No related tags found
1 merge request!17Aggregate benchmark results
......@@ -98,17 +98,17 @@ private:
}
};
void write_test(const std::vector<test>& data, const std::string& fname) {
void write_test(const std::vector<Test>& data, const std::string& fname) {
nlohmann::json test;
for (auto& entry : data) {
test["test"].push_back(entry.json);
test["tests"].push_back(entry.json);
}
std::cout << fmt::format("Writing test data to {}\n", fname);
std::ofstream output_file(fname);
output_file << std::setw(4) << test << "\n";
}
void write_test(const test& data, const std::string& fname) {
std::vector<test> vtd{data};
void write_test(const Test& data, const std::string& fname) {
std::vector<Test> vtd{data};
write_test(vtd, fname);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment