Fix stray quote in main.cpp and scheduler time overflow

- Remove trailing " from AUTO GENERATED INCLUDE BLOCK END comment
- Reset scheduler `now` at start of each outer iteration to avoid
  unbounded growth toward UINT32_MAX across benchmark iterations
This commit is contained in:
J. Nick Koston
2026-03-17 00:35:53 -10:00
parent eb94465174
commit ca2cf4044c
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ It replaces the default ESPHome main with a benchmark runner.
// Auto generated code by esphome
// ========== AUTO GENERATED INCLUDE BLOCK BEGIN ===========
// ========== AUTO GENERATED INCLUDE BLOCK END ==========="
// ========== AUTO GENERATED INCLUDE BLOCK END ===========
void original_setup() {
// Code-generated App initialization (pre_setup, area/device registration, etc.)
+2 -3
View File
@@ -72,10 +72,9 @@ static void Scheduler_Call_5IntervalsFiring(benchmark::State &state) {
}
scheduler.process_to_add();
// Start at a known time so intervals are immediately due
uint32_t now = millis() + 100;
for (auto _ : state) {
// Reset each outer iteration to avoid unbounded growth toward UINT32_MAX
uint32_t now = 100;
for (int i = 0; i < kInnerIterations; i++) {
scheduler.call(now);
// Advance time by 1ms so intervals are due again next call