LatticeHashForest
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
lhf::PerformanceStatistics Struct Reference

Utility class for enabling code-based profiling. More...

#include <profiling.hpp>

Classes

struct  Duration
 

Public Types

using Count = uint64_t
 
using String = std::string
 
using TimePoint = std::chrono::steady_clock::time_point
 
template<typename K , typename V >
using Map = std::map< K, V >
 

Public Member Functions

Durationget_timer (const String &s)
 
void timer_start (const String &s)
 
void timer_end (const String &s)
 
Countget_counter (const String &s)
 
void inc_counter (const String &s)
 
String dump () const
 

Public Attributes

Map< String, Countcounters
 
Map< String, Durationtimers
 

Detailed Description

Utility class for enabling code-based profiling.

Definition at line 22 of file profiling.hpp.

Member Typedef Documentation

◆ Count

Definition at line 23 of file profiling.hpp.

◆ Map

template<typename K , typename V >
using lhf::PerformanceStatistics::Map = std::map<K, V>

Definition at line 26 of file profiling.hpp.

◆ String

Definition at line 24 of file profiling.hpp.

◆ TimePoint

using lhf::PerformanceStatistics::TimePoint = std::chrono::steady_clock::time_point

Definition at line 25 of file profiling.hpp.

Member Function Documentation

◆ dump()

String lhf::PerformanceStatistics::dump ( ) const
inline

◆ get_counter()

Count & lhf::PerformanceStatistics::get_counter ( const String s)
inline

Definition at line 75 of file profiling.hpp.

Referenced by inc_counter().

◆ get_timer()

Duration & lhf::PerformanceStatistics::get_timer ( const String s)
inline

Definition at line 50 of file profiling.hpp.

Referenced by timer_end(), and timer_start().

◆ inc_counter()

void lhf::PerformanceStatistics::inc_counter ( const String s)
inline

Definition at line 83 of file profiling.hpp.

◆ timer_end()

void lhf::PerformanceStatistics::timer_end ( const String s)
inline

Definition at line 65 of file profiling.hpp.

Referenced by lhf::__CalcTime::~__CalcTime().

◆ timer_start()

void lhf::PerformanceStatistics::timer_start ( const String s)
inline

Definition at line 58 of file profiling.hpp.

Referenced by lhf::__CalcTime::__CalcTime().

Member Data Documentation

◆ counters

Map<String, Count> lhf::PerformanceStatistics::counters

Definition at line 45 of file profiling.hpp.

Referenced by dump(), and get_counter().

◆ timers

Map<String, Duration> lhf::PerformanceStatistics::timers

Definition at line 46 of file profiling.hpp.

Referenced by dump(), and get_timer().


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