5 #ifndef JODA_BENCHMARK_H
6 #define JODA_BENCHMARK_H
8 #include <glog/logging.h>
9 #include <rapidjson/document.h>
17 namespace fs = std::filesystem;
42 explicit Benchmark(
const std::string &file);
60 void addValue(
const std::string &header, T &&val) {
71 void addValue(
const std::string &prefix,
const std::string &header, T &&val) {
97 std::lock_guard<std::mutex> lock(
mut);
105 void addThread(
double bloom,
double select,
double project,
double agg,
106 double copy,
double serialize,
double sample_view_cost);
163 static auto constexpr
THREADS =
"/Runtime/Threads";
rapidjson::GenericDocument< RJChar, RJMemoryPoolAlloc, RJBaseAlloc > RJDocument
Definition: RJFwd.h:28
rapidjson::GenericPointer< RJValue, RJBaseAlloc > RJPointer
Definition: RJFwd.h:30
rapidjson::GenericValue< RJChar, RJMemoryPoolAlloc > RJValue
Definition: RJFwd.h:29
Definition: Benchmark.h:27
void addValue(const std::string &prefix, const std::string &header, T &&val)
Definition: Benchmark.h:71
std::string toString() const
Definition: Benchmark.cpp:127
RJValue currentLine
Definition: Benchmark.h:150
virtual ~Benchmark()
Definition: Benchmark.cpp:137
static constexpr auto THREADS
Definition: Benchmark.h:163
static constexpr auto RUNTIME
Definition: Benchmark.h:162
std::mutex mut
Definition: Benchmark.h:148
Benchmark(const Benchmark &b)=delete
void addThread(double bloom, double select, double project, double agg, double copy, double serialize, double sample_view_cost)
Definition: Benchmark.cpp:159
const RJValue & getLastLine() const
Definition: Benchmark.cpp:201
std::string currentLineToString() const
Definition: Benchmark.cpp:149
RJDocument benchDoc
Definition: Benchmark.h:149
void addValueAt(const RJPointer &pointer, T &&val)
Definition: Benchmark.h:95
void addValue(const std::string &header, T &&val)
Definition: Benchmark.h:60
void addValueAt(const std::string &pointer, T &&val)
Definition: Benchmark.h:82
fs::path benchfile
Definition: Benchmark.h:153
void finishLine()
Definition: Benchmark.cpp:110
Benchmark()
Definition: Benchmark.cpp:19
Benchmark & operator=(const Benchmark &b)=delete
std::string lastLineToString() const
Definition: Benchmark.cpp:139
void parseBenchfile()
Definition: Benchmark.cpp:74
bool isValid() const
Definition: Benchmark.cpp:199
bool valid
Definition: Benchmark.h:151
void writeBenchfile() const
Definition: Benchmark.cpp:98