|
Template Numerical Library version\ main:0b2c40f
|
Logger that outputs benchmark results to terminal/console. More...
#include <TNL/Benchmarks/TerminalLogging.h>
Public Member Functions | |
| TerminalLogger (std::ostream &terminal, int verbose=1) | |
| Constructs terminal logger. | |
| void | logResult (const std::string &performer, const HeaderElements &headerElements, const RowElements &rowElements, const std::string &errorMessage="") override |
| Logs a benchmark result to terminal. | |
| void | writeErrorMessage (const std::string &message) override |
| Logs an error message to terminal. | |
| Public Member Functions inherited from TNL::Benchmarks::Logging | |
| Logging (std::ostream &log, int verbose=1) | |
| Constructs logger with output stream. | |
| const MetadataColumns & | getMetadataColumns () const |
| Gets current metadata columns. | |
| int | getVerbose () const |
| Gets current verbosity level. | |
| virtual void | setMetadataColumns (const MetadataColumns &elements) |
| Sets all metadata columns at once. | |
| virtual void | setMetadataElement (const typename MetadataColumns::value_type &element, int insertPosition=-1) |
| Updates or adds a single metadata element. | |
| void | setVerbose (int verbose) |
| Sets verbosity level. | |
| void | syncMetadata (Logging &other) |
| Copies metadata from another logger instance. | |
Protected Attributes | |
| MetadataColumns | lastMetadata |
| Protected Attributes inherited from TNL::Benchmarks::Logging | |
| bool | header_changed = true |
| std::ostream & | log |
| MetadataColumns | metadataColumns |
| int | verbose = 0 |
Additional Inherited Members | |
| Public Types inherited from TNL::Benchmarks::Logging | |
| using | HeaderElements = std::vector< std::string > |
| using | MetadataColumns = std::vector< MetadataElement > |
| using | MetadataElement = std::pair< std::string, std::string > |
| using | RowElements = LoggingRowElements |
Logger that outputs benchmark results to terminal/console.
Provides human-readable output with configurable verbosity:
Metadata is printed once when it changes, followed by result rows.
Example output (verbose=1):
|
inline |
Constructs terminal logger.
| terminal | Output stream (typically std::cout) |
| verbose | Verbosity level (0=silent, 1=normal, 2=verbose) |
|
inlineoverridevirtual |
Logs a benchmark result to terminal.
Prints metadata block header when metadata changes, then the result row. Format varies based on verbosity level.
| performer | Name of implementation being tested |
| headerElements | Column names |
| rowElements | Formatted row values |
| errorMessage | Optional error description |
Implements TNL::Benchmarks::Logging.
|
inlineoverridevirtual |
Logs an error message to terminal.
| message | Error description |
Implements TNL::Benchmarks::Logging.