KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
Loading...
Searching...
No Matches
kamping::measurements::SimpleJsonPrinter< Duration > Class Template Reference

Printer class that prints an evaluated TimerTree in Json format. More...

#include <printer.hpp>

Public Member Functions

 SimpleJsonPrinter ()
 Construct a printer that use std::cout as outstream.
 
 SimpleJsonPrinter (std::ostream &outstream)
 Construct a printer printing to a given outstream.
 
 SimpleJsonPrinter (std::ostream &outstream, std::vector< std::pair< std::string, std::string > > config_info)
 Construct a printer printing to a given outstream and adding additional configuration info.
 
void print (AggregatedTreeNode< Duration > const &node, std::size_t indentation=0)
 Prints an evaluated TimerTree in Json format to stdout.
 

Detailed Description

template<typename Duration = double>
class kamping::measurements::SimpleJsonPrinter< Duration >

Printer class that prints an evaluated TimerTree in Json format.

Template Parameters
DurationType to represent a duration.

Constructor & Destructor Documentation

◆ SimpleJsonPrinter() [1/2]

template<typename Duration = double>
kamping::measurements::SimpleJsonPrinter< Duration >::SimpleJsonPrinter ( std::ostream & outstream)
inline

Construct a printer printing to a given outstream.

Parameters
outstreamOutstream on which the content is printed.

◆ SimpleJsonPrinter() [2/2]

template<typename Duration = double>
kamping::measurements::SimpleJsonPrinter< Duration >::SimpleJsonPrinter ( std::ostream & outstream,
std::vector< std::pair< std::string, std::string > > config_info )
inline

Construct a printer printing to a given outstream and adding additional configuration info.

Parameters
outstreamOutstream on which the content is printed.
config_infoAdditional configuration info (vector of key-value pairs), which will be printed as a "config" - dict by the printer.

Member Function Documentation

◆ print()

template<typename Duration = double>
void kamping::measurements::SimpleJsonPrinter< Duration >::print ( AggregatedTreeNode< Duration > const & node,
std::size_t indentation = 0 )
inline

Prints an evaluated TimerTree in Json format to stdout.

Parameters
nodeRoot node of the TimerTree to print.
indentationIndentation to use for the node.

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