ESPHome 2026.4.1
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}
 

Static Public Attributes

static uint64_t global_recorded_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 109 of file component.h.

Member Function Documentation

◆ record_time()

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

Definition at line 126 of file component.h.

◆ reset_period()

void esphome::ComponentRuntimeStats::reset_period ( )
inline

Definition at line 137 of file component.h.

Field Documentation

◆ global_recorded_us

uint64_t esphome::ComponentRuntimeStats::global_recorded_us = 0
static

Definition at line 124 of file component.h.

◆ period_count

uint32_t esphome::ComponentRuntimeStats::period_count {0}

Definition at line 111 of file component.h.

◆ period_max_time_us

uint32_t esphome::ComponentRuntimeStats::period_max_time_us {0}

Definition at line 113 of file component.h.

◆ period_time_us

uint32_t esphome::ComponentRuntimeStats::period_time_us {0}

Definition at line 112 of file component.h.

◆ total_count

uint32_t esphome::ComponentRuntimeStats::total_count {0}

Definition at line 115 of file component.h.

◆ total_max_time_us

uint32_t esphome::ComponentRuntimeStats::total_max_time_us {0}

Definition at line 117 of file component.h.

◆ total_time_us

uint64_t esphome::ComponentRuntimeStats::total_time_us {0}

Definition at line 116 of file component.h.


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