Skip to content
Snippets Groups Projects

Aggregate benchmark results

Merged Sylvester Joosten requested to merge 8-benchmark-definition-standard into master
All threads resolved!
2 files
+ 22
4
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 4
4
@@ -49,9 +49,9 @@
@@ -49,9 +49,9 @@
// library
// library
namespace eic::util {
namespace eic::util {
struct TestDefinitionError : exception {
struct TestDefinitionError : Exception {
TestDefinitionError(std::string_view msg)
TestDefinitionError(std::string_view msg)
: exception(msg, "test_definition_error") {}
: Exception(msg, "test_definition_error") {}
};
};
// Wrapper for our test data json, with three methods to set the status
// Wrapper for our test data json, with three methods to set the status
@@ -68,7 +68,7 @@ struct TestDefinitionError : exception {
@@ -68,7 +68,7 @@ struct TestDefinitionError : exception {
// - weight: Weight for this test (this is defaulted to 1.0 if not specified)
// - weight: Weight for this test (this is defaulted to 1.0 if not specified)
// - result: pass/fail/error
// - result: pass/fail/error
struct Test {
struct Test {
test(nlohmann::json definition) : json{std::move(definition)} {
Test(nlohmann::json definition) : json{std::move(definition)} {
// initialize with error (as we don't have a value yet)
// initialize with error (as we don't have a value yet)
error();
error();
// Check that all required fields are present
// Check that all required fields are present
@@ -101,7 +101,7 @@ private:
@@ -101,7 +101,7 @@ 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;
nlohmann::json test;
for (auto& entry : data) {
for (auto& entry : data) {
test.push_back(entry.json);
test["test"].push_back(entry.json);
}
}
std::cout << fmt::format("Writing test data to {}\n", fname);
std::cout << fmt::format("Writing test data to {}\n", fname);
std::ofstream output_file(fname);
std::ofstream output_file(fname);
Loading