TablePrinter Class Reference
|
CPP API
|
Public Member Functions |
Static Private Member Functions |
Private Attributes |
List of all members
mio::timing::TablePrinter Class Reference
#include <table_printer.h>
Inheritance diagram for mio::timing::TablePrinter:
Collaboration diagram for mio::timing::TablePrinter:
Public Member Functions | |
| void | print (const std::list< TimerRegistration > &timer_register, std::ostream &out=std::cout) override |
| Print a table with timing results (aggregated over threads). More... | |
| void | set_time_format (std::string format_string) |
| Change the format_string used for printed time values. More... | |
Public Member Functions inherited from mio::timing::Printer | |
| virtual | ~Printer () |
Static Private Member Functions | |
| static std::tuple< details::Table< double >, bool, size_t, double > | create_table (const std::list< TimerRegistration > &timer_register) |
| The first part of the print function, separated as a somewhat independent step. More... | |
Private Attributes | |
| std::string | m_time_format = "{:e}" |
| Format string used to print elapsed time and other timing statistics. More... | |
Member Function Documentation
◆ create_table()
|
inlinestaticprivate |
The first part of the print function, separated as a somewhat independent step.
- Parameters
-
[in] timer_register The list of all timers that should be converted to a table.
- Returns
- Returns the table of timers, whether multiple threads were used, the width of the name column, and the largest value found in the table.
◆ print()
|
inlineoverridevirtual |
Print a table with timing results (aggregated over threads).
If multiple threads were used for timing, adds columns with min, max and average time measured per thread, and a column with the number of threads.
- Parameters
-
[in] timer_register TimerRegistrar's register of timers. [in,out] out The stream to write to.
Implements mio::timing::Printer.
◆ set_time_format()
|
inline |
Change the format_string used for printed time values.
Default is scientific notation "{:e}".
- Parameters
-
[in] format_string A format string for printing double values. Should have fixed width, like "{:16.4f}".
Member Data Documentation
◆ m_time_format
|
private |
Format string used to print elapsed time and other timing statistics.
Generated by
Public Member Functions inherited from