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

Printer class that prints an evaluated TimerTree in a flat format in which the timer hierarchy is collapsed into a dot separated identifier per measurement. More...

#include <printer.hpp>

Public Member Functions

 FlatPrinter ()
 Construct a printer that use std::cout as outstream.
 
 FlatPrinter (std::ostream &outstream)
 Construct a printer printing to a given outstream.
 
template<typename Duration >
void print (AggregatedTreeNode< Duration > const &node)
 Prints an evaluated TimerTree in Json format to stdout.
 

Detailed Description

Printer class that prints an evaluated TimerTree in a flat format in which the timer hierarchy is collapsed into a dot separated identifier per measurement.

For example:

timer.start("algo")
timer.start("subroutine")
timer.start("subsubroutine")
timer.stop()
timer.stop()
timer.stop()
Timer< Communicator<> > & timer()
Gets a reference to a kamping::measurements::BasicTimer.
Definition timer.hpp:280

will return an output conceptually similar to

// algo=<duration data> algo.subroutine= <duration data> algo.subroutine.subsubroutine= <duration data> ...

when printed with FlatPrinter.

Constructor & Destructor Documentation

◆ FlatPrinter()

kamping::measurements::FlatPrinter::FlatPrinter ( std::ostream & outstream)
inline

Construct a printer printing to a given outstream.

Parameters
outstreamOutstream on which the content is printed.

Member Function Documentation

◆ print()

template<typename Duration >
void kamping::measurements::FlatPrinter::print ( AggregatedTreeNode< Duration > const & node)
inline

Prints an evaluated TimerTree in Json format to stdout.

Template Parameters
DurationType to represent a duration.
Parameters
nodeRoot node of the TimerTree to print.

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