HEBench
hebench::ReportGen::cpp::TimingReport Class Reference

#include <hebench_report_cpp.h>

Inheritance diagram for hebench::ReportGen::cpp::TimingReport:

Public Member Functions

 TimingReport (const TimingReport &)=delete
 
 TimingReport (const std::string &header=std::string())
 
 TimingReport (TimingReport &&)
 
virtual ~TimingReport ()
 
TimingReportoperator= (TimingReport &&)
 
void setHeader (const std::string &new_header)
 
void appendHeader (const std::string &new_header, bool new_line=true)
 
void prependHeader (const std::string &new_header, bool new_line=true)
 
std::string getHeader () const
 
void setFooter (const std::string &new_footer)
 
void appendFooter (const std::string &new_header, bool new_line=true)
 
void prependFooter (const std::string &new_header, bool new_line=true)
 
std::string getFooter () const
 
void addEventType (uint32_t event_type_id, const std::string &event_type_header, bool is_main_event=false)
 Adds a new event type to the types of events. More...
 
bool hasEventType (uint32_t event_type_id) const
 
std::string getEventTypeHeader (uint32_t event_type_id) const
 
uint64_t getEventTypeCount () const
 
uint32_t getEventType (uint64_t index) const
 Retrieve an event type ID. More...
 
uint32_t getMainEventType () const
 
void addEvent (const TimingReportEventC &p_event)
 
void getEvent (TimingReportEventC &p_event, uint64_t index) const
 
uint64_t getEventCount () const
 
uint64_t getEventCapacity () const
 
void setEventCapacity (uint64_t new_capacity)
 
void clear ()
 
void save2CSV (const std::string &filename)
 
std::string convert2CSV ()
 

Static Public Member Functions

static TimingReport loadReportFromCSV (const std::string &s_csv_content)
 
static TimingReport loadReportFromCSVFile (const std::string &filename)
 
template<class TimeInterval = std::ratio<1, 1>>
static double computeElapsedWallTime (const TimingReportEventC &event)
 
template<class TimeInterval = std::ratio<1, 1>>
static double computeElapsedCPUTime (const TimingReportEventC &event)
 

Friends

class ReportSummary
 

Detailed Description

Definition at line 138 of file hebench_report_cpp.h.

Constructor & Destructor Documentation

◆ TimingReport() [1/3]

hebench::ReportGen::cpp::TimingReport::TimingReport ( const TimingReport )
delete

◆ TimingReport() [2/3]

hebench::ReportGen::cpp::TimingReport::TimingReport ( const std::string &  header = std::string())

Definition at line 73 of file hebench_report_cpp.cpp.

◆ TimingReport() [3/3]

hebench::ReportGen::cpp::TimingReport::TimingReport ( TimingReport &&  src)

Definition at line 84 of file hebench_report_cpp.cpp.

◆ ~TimingReport()

hebench::ReportGen::cpp::TimingReport::~TimingReport ( )
virtual

Definition at line 102 of file hebench_report_cpp.cpp.

Member Function Documentation

◆ addEvent()

void hebench::ReportGen::cpp::TimingReport::addEvent ( const TimingReportEventC p_event)

Definition at line 227 of file hebench_report_cpp.cpp.

◆ addEventType()

void hebench::ReportGen::cpp::TimingReport::addEventType ( uint32_t  event_type_id,
const std::string &  event_type_header,
bool  is_main_event = false 
)

Adds a new event type to the types of events.

Parameters
event_type_id
event_type_header
is_main_event

event type: groups a collection of events under the same type.

If an event of the same type already exists the following will happen:

  • This method will overwrite the existing event header.
  • If is_main_event is true, the existing event type will be set as the main event. Otherwise, event type status as main event remains unchanged.

Definition at line 168 of file hebench_report_cpp.cpp.

◆ appendFooter()

void hebench::ReportGen::cpp::TimingReport::appendFooter ( const std::string &  new_header,
bool  new_line = true 
)

Definition at line 144 of file hebench_report_cpp.cpp.

◆ appendHeader()

void hebench::ReportGen::cpp::TimingReport::appendHeader ( const std::string &  new_header,
bool  new_line = true 
)

Definition at line 114 of file hebench_report_cpp.cpp.

◆ clear()

void hebench::ReportGen::cpp::TimingReport::clear ( )

Definition at line 255 of file hebench_report_cpp.cpp.

◆ computeElapsedCPUTime()

template<class TimeInterval >
double hebench::ReportGen::cpp::TimingReport::computeElapsedCPUTime ( const TimingReportEventC event)
static

Definition at line 229 of file hebench_report_cpp.h.

◆ computeElapsedWallTime()

template<class TimeInterval >
double hebench::ReportGen::cpp::TimingReport::computeElapsedWallTime ( const TimingReportEventC event)
static

Definition at line 221 of file hebench_report_cpp.h.

◆ convert2CSV()

std::string hebench::ReportGen::cpp::TimingReport::convert2CSV ( )

Definition at line 267 of file hebench_report_cpp.cpp.

◆ getEvent()

void hebench::ReportGen::cpp::TimingReport::getEvent ( TimingReportEventC p_event,
uint64_t  index 
) const

Definition at line 233 of file hebench_report_cpp.cpp.

◆ getEventCapacity()

uint64_t hebench::ReportGen::cpp::TimingReport::getEventCapacity ( ) const

Definition at line 244 of file hebench_report_cpp.cpp.

◆ getEventCount()

uint64_t hebench::ReportGen::cpp::TimingReport::getEventCount ( ) const

Definition at line 239 of file hebench_report_cpp.cpp.

◆ getEventType()

uint32_t hebench::ReportGen::cpp::TimingReport::getEventType ( uint64_t  index) const

Retrieve an event type ID.

Parameters
p_report
[in]indexIndex of the event type to retrieve. Must be less than getEventTypeCount() .
Returns
ID of the event type corresponding to the specified index.
Exceptions
Instanceof std::except on error.

Definition at line 209 of file hebench_report_cpp.cpp.

◆ getEventTypeCount()

uint64_t hebench::ReportGen::cpp::TimingReport::getEventTypeCount ( ) const

Definition at line 204 of file hebench_report_cpp.cpp.

◆ getEventTypeHeader()

std::string hebench::ReportGen::cpp::TimingReport::getEventTypeHeader ( uint32_t  event_type_id) const

Definition at line 192 of file hebench_report_cpp.cpp.

◆ getFooter()

std::string hebench::ReportGen::cpp::TimingReport::getFooter ( ) const

Definition at line 156 of file hebench_report_cpp.cpp.

◆ getHeader()

std::string hebench::ReportGen::cpp::TimingReport::getHeader ( ) const

Definition at line 126 of file hebench_report_cpp.cpp.

◆ getMainEventType()

uint32_t hebench::ReportGen::cpp::TimingReport::getMainEventType ( ) const

Definition at line 217 of file hebench_report_cpp.cpp.

◆ hasEventType()

bool hebench::ReportGen::cpp::TimingReport::hasEventType ( uint32_t  event_type_id) const

Definition at line 182 of file hebench_report_cpp.cpp.

◆ loadReportFromCSV()

TimingReport hebench::ReportGen::cpp::TimingReport::loadReportFromCSV ( const std::string &  s_csv_content)
static

Definition at line 281 of file hebench_report_cpp.cpp.

◆ loadReportFromCSVFile()

TimingReport hebench::ReportGen::cpp::TimingReport::loadReportFromCSVFile ( const std::string &  filename)
static

Definition at line 293 of file hebench_report_cpp.cpp.

◆ operator=()

TimingReport & hebench::ReportGen::cpp::TimingReport::operator= ( TimingReport &&  src)

Definition at line 90 of file hebench_report_cpp.cpp.

◆ prependFooter()

void hebench::ReportGen::cpp::TimingReport::prependFooter ( const std::string &  new_header,
bool  new_line = true 
)

Definition at line 150 of file hebench_report_cpp.cpp.

◆ prependHeader()

void hebench::ReportGen::cpp::TimingReport::prependHeader ( const std::string &  new_header,
bool  new_line = true 
)

Definition at line 120 of file hebench_report_cpp.cpp.

◆ save2CSV()

void hebench::ReportGen::cpp::TimingReport::save2CSV ( const std::string &  filename)

Definition at line 261 of file hebench_report_cpp.cpp.

◆ setEventCapacity()

void hebench::ReportGen::cpp::TimingReport::setEventCapacity ( uint64_t  new_capacity)

Definition at line 249 of file hebench_report_cpp.cpp.

◆ setFooter()

void hebench::ReportGen::cpp::TimingReport::setFooter ( const std::string &  new_footer)

Definition at line 138 of file hebench_report_cpp.cpp.

◆ setHeader()

void hebench::ReportGen::cpp::TimingReport::setHeader ( const std::string &  new_header)

Definition at line 108 of file hebench_report_cpp.cpp.

Friends And Related Function Documentation

◆ ReportSummary

friend class ReportSummary
friend

Definition at line 140 of file hebench_report_cpp.h.


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