KiCad PCB EDA Suite
Loading...
Searching...
No Matches
LATENCY_PROBE Class Reference

#include <profile.h>

Classes

struct  CHECKPOINT
 

Public Types

using CLOCK = std::chrono::high_resolution_clock
 
using TIME_POINT = std::chrono::time_point<CLOCK>
 

Public Member Functions

 LATENCY_PROBE (const std::string &aName, int aStages=8)
 
void Reset ()
 
void Checkpoint (const std::string &aName)
 
void AddTimer (PROF_TIMER &aTimer)
 
std::string to_string ()
 
double delta_ms (TIME_POINT a, TIME_POINT b)
 

Private Attributes

TIME_POINT m_start
 
std::string m_name
 
std::vector< CHECKPOINTm_checkpoints
 

Detailed Description

Definition at line 302 of file profile.h.

Member Typedef Documentation

◆ CLOCK

using LATENCY_PROBE::CLOCK = std::chrono::high_resolution_clock

Definition at line 305 of file profile.h.

◆ TIME_POINT

using LATENCY_PROBE::TIME_POINT = std::chrono::time_point<CLOCK>

Definition at line 306 of file profile.h.

Constructor & Destructor Documentation

◆ LATENCY_PROBE()

LATENCY_PROBE::LATENCY_PROBE ( const std::string & aName,
int aStages = 8 )
inline

Definition at line 316 of file profile.h.

References m_checkpoints, and m_name.

Member Function Documentation

◆ AddTimer()

◆ Checkpoint()

void LATENCY_PROBE::Checkpoint ( const std::string & aName)
inline

◆ delta_ms()

double LATENCY_PROBE::delta_ms ( TIME_POINT a,
TIME_POINT b )
inline

Definition at line 347 of file profile.h.

Referenced by to_string().

◆ Reset()

void LATENCY_PROBE::Reset ( )
inline

Definition at line 322 of file profile.h.

References m_checkpoints, and m_start.

◆ to_string()

std::string LATENCY_PROBE::to_string ( )

Definition at line 79 of file profile.cpp.

References delta_ms(), m_checkpoints, m_name, and m_start.

Member Data Documentation

◆ m_checkpoints

std::vector<CHECKPOINT> LATENCY_PROBE::m_checkpoints
private

Definition at line 357 of file profile.h.

Referenced by AddTimer(), Checkpoint(), LATENCY_PROBE(), Reset(), and to_string().

◆ m_name

std::string LATENCY_PROBE::m_name
private

Definition at line 356 of file profile.h.

Referenced by LATENCY_PROBE(), and to_string().

◆ m_start

TIME_POINT LATENCY_PROBE::m_start
private

Definition at line 355 of file profile.h.

Referenced by Reset(), and to_string().


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