Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
benchmarkutils.h
Go to the documentation of this file.
1 
18 #ifndef ION_ANALYTICS_BENCHMARKUTILS_H_
19 #define ION_ANALYTICS_BENCHMARKUTILS_H_
20 
21 #include <iostream> // NOLINT
22 #include <string>
23 
25 
26 namespace ion {
27 namespace analytics {
28 
33 ION_API size_t MergeBenchmarks(const Benchmark& from, Benchmark* to);
34 
38 ION_API void OutputBenchmarkAsCsv(const Benchmark& benchmark,
39  std::ostream& out); // NOLINT
40 
42 ION_API void OutputConstantAsJson(const Benchmark::Constant& c,
43  const std::string& indent,
44  std::ostream& out); // NOLINT
45 
48  const Benchmark::AccumulatedVariable& v, const std::string& indent,
49  std::ostream& out); // NOLINT
50 
89 ION_API void OutputBenchmarkAsJson(const Benchmark& benchmark,
90  const std::string& indent,
91  std::ostream& out); // NOLINT
92 
95 ION_API void OutputBenchmarkPretty(const std::string& header_string,
96  bool print_descriptions,
97  const Benchmark& benchmark,
98  std::ostream& out); // NOLINT
99 
100 } // namespace analytics
101 } // namespace ion
102 
103 #endif // ION_ANALYTICS_BENCHMARKUTILS_H_
void OutputBenchmarkAsJson(const Benchmark &benchmark, const std::string &indent_in, std::ostream &out)
Outputs benchmark results as JSON, suitable for serialization and use in performance dashboards...
void OutputBenchmarkAsCsv(const Benchmark &benchmark, std::ostream &out)
Outputs benchmark results as CSV (comma-separated values), suitable for use in performance dashboards...
void OutputConstantAsJson(const Benchmark::Constant &c, const std::string &indent, std::ostream &out)
Outputs a Constant as JSON. See below for the output format.
size_t MergeBenchmarks(const Benchmark &from, Benchmark *to)
Public functions.
void OutputBenchmarkPretty(const std::string &id_string, bool print_descriptions, const Benchmark &benchmark, std::ostream &out)
Outputs benchmark results in pretty format.
void OutputAccumulatedVariableAsJson(const Benchmark::AccumulatedVariable &v, const std::string &indent, std::ostream &out)
Outputs an AccumulatedVariable as JSON. See below for the output format.