An abstract class for writing benchmark information. More...
#include <BenchFormatter.h>
Public Member Functions | |
virtual void | writeTitle (const std::vector< std::string > &titles, const std::vector< std::string > &values)=0 |
write the titles of the columns or groups. | |
virtual void | writeResult (const std::string &val, std::vector< BenchResult > results)=0 |
write the result information for value val. | |
virtual void | finish () |
Called after all benchmarks have run. |
An abstract class for writing benchmark information.
Implement the functions in this abstract class to provide output from the benchmarks.
virtual void BenchFormatter::finish | ( | ) | [inline, virtual] |
Called after all benchmarks have run.
This is a good place to close any open file handles.
Reimplemented in CsvFormatter, and XmlFormatter.
virtual void BenchFormatter::writeResult | ( | const std::string & | val, |
std::vector< BenchResult > | results | ||
) | [pure virtual] |
write the result information for value val.
val | const std::string& the value. |
results | std::vector<BenchResult> a vector of benchmark results. |
The benchmark results appear in the order the corresponding benchmarks were added to the BenchmarkGroup.
Implemented in ConsoleFormatter, CsvFormatter, and XmlFormatter.
virtual void BenchFormatter::writeTitle | ( | const std::vector< std::string > & | titles, |
const std::vector< std::string > & | values | ||
) | [pure virtual] |
write the titles of the columns or groups.
titles | std::vector<std::string>&. |
Implemented in ConsoleFormatter, CsvFormatter, and XmlFormatter.