Public Member Functions

BenchFormatter Class Reference

An abstract class for writing benchmark information. More...

#include <BenchFormatter.h>

Inheritance diagram for BenchFormatter:
ConsoleFormatter CsvFormatter XmlFormatter

List of all members.

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.

Detailed Description

An abstract class for writing benchmark information.

Implement the functions in this abstract class to provide output from the benchmarks.


Member Function Documentation

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.

Parameters:
valconst std::string& the value.
resultsstd::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.

Parameters:
titlesstd::vector<std::string>&.

Implemented in ConsoleFormatter, CsvFormatter, and XmlFormatter.


The documentation for this class was generated from the following files: