mars_lib  0.1.0.3dc76ee85e09
Modular and Robust Sensor-Fusion
Public Member Functions | Private Types | Private Attributes | List of all members
mars::MPerf Class Reference

The MPerf class Class which hosts individual time tracking instances. More...

#include </home/runner/work/mars_lib/mars_lib/source/mars/include/mars/m_perf.h>

+ Collaboration diagram for mars::MPerf:

Public Member Functions

 MPerf (const std::string &name)
 
 ~MPerf ()
 
bool StartEntity (const std::string &entity_name)
 StartEntity Starts/Adds an entity to be tracked. More...
 
bool StopEntity (const std::string &entity_name)
 StopEntity Stops an entity that was tracked. More...
 
std::string PrintStats ()
 PrintStats Prints the stats of all entities. More...
 
std::string get_stats_as_csv (const std::string &entity_name)
 get_stats_as_csv Provide stats of all entities in form of a csv string More...
 
std::string get_entity_names ()
 get_entity_names Print the names of all registered entities More...
 

Private Types

using m_perf_map = std::map< std::string, std::shared_ptr< MPerfType > >
 m_perf_map Type of the map which hosts time tracking elements More...
 

Private Attributes

m_perf_map data_
 data_ Map of all time tracked elements associated by map key More...
 
std::string name_
 name_ Name of the performance tracking instance More...
 
bool name_set_ { false }
 name_set_ Indicator if a name for the tracker was set More...
 
bool verbose_ { false }
 verbose_ Increased console output More...
 

Detailed Description

The MPerf class Class which hosts individual time tracking instances.

This class also handles the print and export of time tracking stats

Member Typedef Documentation

◆ m_perf_map

using mars::MPerf::m_perf_map = std::map<std::string, std::shared_ptr<MPerfType> >
private

m_perf_map Type of the map which hosts time tracking elements

Constructor & Destructor Documentation

◆ MPerf()

mars::MPerf::MPerf ( const std::string &  name)

◆ ~MPerf()

mars::MPerf::~MPerf ( )

Member Function Documentation

◆ StartEntity()

bool mars::MPerf::StartEntity ( const std::string &  entity_name)

StartEntity Starts/Adds an entity to be tracked.

Parameters
entity_nameName of the entity
Returns

◆ StopEntity()

bool mars::MPerf::StopEntity ( const std::string &  entity_name)

StopEntity Stops an entity that was tracked.

Parameters
entity_nameName of the entity
Returns

◆ PrintStats()

std::string mars::MPerf::PrintStats ( )

PrintStats Prints the stats of all entities.

Returns

◆ get_stats_as_csv()

std::string mars::MPerf::get_stats_as_csv ( const std::string &  entity_name)

get_stats_as_csv Provide stats of all entities in form of a csv string

Parameters
entity_name
Returns

◆ get_entity_names()

std::string mars::MPerf::get_entity_names ( )

get_entity_names Print the names of all registered entities

Returns

Member Data Documentation

◆ data_

m_perf_map mars::MPerf::data_
private

data_ Map of all time tracked elements associated by map key

◆ name_

std::string mars::MPerf::name_
private

name_ Name of the performance tracking instance

◆ name_set_

bool mars::MPerf::name_set_ { false }
private

name_set_ Indicator if a name for the tracker was set

◆ verbose_

bool mars::MPerf::verbose_ { false }
private

verbose_ Increased console output


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