CGRA-ME
Public Member Functions | Private Attributes | List of all members
PrintOnDestructionChronoSequence Struct Reference

#include <CodeProfiling.h>

Inheritance diagram for PrintOnDestructionChronoSequence:
ChronoSequence

Public Member Functions

 PrintOnDestructionChronoSequence (std::string sequence_name, std::ostream *print_into_on_destruction)
 
 PrintOnDestructionChronoSequence (const PrintOnDestructionChronoSequence &)=default
 
PrintOnDestructionChronoSequenceoperator= (const PrintOnDestructionChronoSequence &)=default
 
 PrintOnDestructionChronoSequence (PrintOnDestructionChronoSequence &)=default
 
PrintOnDestructionChronoSequenceoperator= (PrintOnDestructionChronoSequence &)=default
 
 ~PrintOnDestructionChronoSequence () override
 
- Public Member Functions inherited from ChronoSequence
 ChronoSequence (std::string sequence_name)
 
virtual ~ChronoSequence ()=default
 
auto now () const
 
TimeEntry makeNowTick (std::string timepoint_name) const
 
TickResult tick (std::string timepoint_name, double threshold=0.0, std::ostream *os=nullptr)
 
void printTo (std::ostream &os) const
 
void printEntry (const TimeEntry &entry, const TimeEntry &previous, std::ostream &os, std::ptrdiff_t name_width=0) const
 
double getTotal ()
 
double secondsSinceStart ()
 

Private Attributes

std::ostream * print_into_on_destruction
 

Additional Inherited Members

- Public Types inherited from ChronoSequence
using Clock = std::chrono::steady_clock
 
using TimePoint = std::chrono::time_point< Clock >
 
using TimeEntry = std::pair< std::string, TimePoint >
 
- Static Public Member Functions inherited from ChronoSequence
static double differenceAsSecondFraction (const TimePoint &start, const TimePoint &end)
 
- Protected Member Functions inherited from ChronoSequence
void recordTick (TimeEntry new_entry, std::ostream *os)
 
- Protected Attributes inherited from ChronoSequence
std::string sequence_name
 
std::vector< TimeEntrytimes
 

Detailed Description

An extension of ChronoSequence that prints itself to the given ostream when this object is destroyed. It creates an "end of" tick at the time of the destructor call.

Definition at line 121 of file CodeProfiling.h.

Constructor & Destructor Documentation

◆ PrintOnDestructionChronoSequence() [1/3]

PrintOnDestructionChronoSequence::PrintOnDestructionChronoSequence ( std::string  sequence_name,
std::ostream *  print_into_on_destruction 
)
inline

Definition at line 123 of file CodeProfiling.h.

◆ PrintOnDestructionChronoSequence() [2/3]

PrintOnDestructionChronoSequence::PrintOnDestructionChronoSequence ( const PrintOnDestructionChronoSequence )
default

◆ PrintOnDestructionChronoSequence() [3/3]

PrintOnDestructionChronoSequence::PrintOnDestructionChronoSequence ( PrintOnDestructionChronoSequence )
default

◆ ~PrintOnDestructionChronoSequence()

PrintOnDestructionChronoSequence::~PrintOnDestructionChronoSequence ( )
inlineoverride

Definition at line 133 of file CodeProfiling.h.

Member Function Documentation

◆ operator=() [1/2]

PrintOnDestructionChronoSequence& PrintOnDestructionChronoSequence::operator= ( const PrintOnDestructionChronoSequence )
default

◆ operator=() [2/2]

PrintOnDestructionChronoSequence& PrintOnDestructionChronoSequence::operator= ( PrintOnDestructionChronoSequence )
default

Member Data Documentation

◆ print_into_on_destruction

std::ostream* PrintOnDestructionChronoSequence::print_into_on_destruction
private

Definition at line 147 of file CodeProfiling.h.


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