ESPHome 2026.4.0-dev
Loading...
Searching...
No Matches
esphome::ComponentRuntimeStats Struct Reference

Inline runtime statistics — eliminates std::map lookup on every loop iteration. More...

#include <component.h>

Public Member Functions

void record_time (uint32_t duration_us)
 
void reset_period ()
 

Data Fields

uint32_t period_count {0}
 
uint32_t period_time_us {0}
 
uint32_t period_max_time_us {0}
 
uint32_t total_count {0}
 
uint64_t total_time_us {0}
 
uint32_t total_max_time_us {0}
 

Detailed Description

Inline runtime statistics — eliminates std::map lookup on every loop iteration.

Only present when USE_RUNTIME_STATS is defined (profiling builds).

Definition at line 104 of file component.h.

Member Function Documentation

◆ record_time()

void esphome::ComponentRuntimeStats::record_time ( uint32_t duration_us)
inline

Definition at line 114 of file component.h.

◆ reset_period()

void esphome::ComponentRuntimeStats::reset_period ( )
inline

Definition at line 124 of file component.h.

Field Documentation

◆ period_count

uint32_t esphome::ComponentRuntimeStats::period_count {0}

Definition at line 106 of file component.h.

◆ period_max_time_us

uint32_t esphome::ComponentRuntimeStats::period_max_time_us {0}

Definition at line 108 of file component.h.

◆ period_time_us

uint32_t esphome::ComponentRuntimeStats::period_time_us {0}

Definition at line 107 of file component.h.

◆ total_count

uint32_t esphome::ComponentRuntimeStats::total_count {0}

Definition at line 110 of file component.h.

◆ total_max_time_us

uint32_t esphome::ComponentRuntimeStats::total_max_time_us {0}

Definition at line 112 of file component.h.

◆ total_time_us

uint64_t esphome::ComponentRuntimeStats::total_time_us {0}

Definition at line 111 of file component.h.


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