1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
#pragma once
#include <tao/json/value.hpp>
#include <tao/config/value.hpp>
#include <string>
#include <vector>
/*
{
name: "bla",
timestamp: "<epoch>",
config: {...},
rounds: [
{
threads: {} | []
runtime: 10054.736,
operations: 87324
}
]
}
*/
struct thread_report {
// a JSON value containing arbitrary result data for this thread
tao::json::value data;
// total number of operations performed by this thread
std::uint64_t operations;
};
struct round_report {
std::vector<thread_report> threads;
double runtime; // runtime in milliseconds
std::uint64_t operations() const;
double throughput() const { return operations() / runtime; }
tao::json::value as_json() const;
};
struct report {
std::string name;
std::int64_t timestamp;
tao::config::value config;
std::vector<round_report> rounds;
tao::json::value as_json() const;
};
|