1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-11 15:52:20 +01:00

runtime_stats

This commit is contained in:
J. Nick Koston
2025-07-08 09:09:07 -06:00
parent b3d7f001af
commit d06bab01ac
7 changed files with 260 additions and 0 deletions

View File

@@ -395,6 +395,9 @@ uint32_t WarnIfComponentBlockingGuard::finish() {
uint32_t curr_time = millis();
uint32_t blocking_time = curr_time - this->started_;
// Record component runtime stats
runtime_stats.record_component_time(this->component_, blocking_time, curr_time);
bool should_warn;
if (this->component_ != nullptr) {
should_warn = this->component_->should_warn_of_blocking(blocking_time);