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

fixed mistake with capitalization update

parent ff71cd77
No related branches found
No related tags found
1 merge request!17Aggregate benchmark results
...@@ -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);
......
#!/usr/bin/env python3
"""
Collect the json files from individual benchmark tests into
a larger json file that combines all benchmark information,
and do additional accounting for the benchmark.
Tests results are expected to have the following file name and directory
structure:
results/<BENCHMARK_NAME>/<SOME_NAME>.json
or
results/<BENCHMARK_NAME>/subdirectory/<SOME_NAME>.json
Internally, we will look for the "tests" keyword in each of these
files to identify them as benchmark components.
"""
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