mirror of
https://github.com/esphome/esphome.git
synced 2026-10-04 18:11:29 +00:00
Add real Application::loop() benchmark, call original_setup() in main
- Call original_setup() in benchmark main.cpp so code-generated App initialization (pre_setup, area/device registration, looping_components_ init) runs before benchmarks - Restore ApplicationLoop_Empty benchmark that calls the actual App.loop()
This commit is contained in:
@@ -20,6 +20,10 @@ void original_setup() {
|
||||
}
|
||||
|
||||
void setup() {
|
||||
// Run auto-generated initialization (App.pre_setup, area/device registration,
|
||||
// looping_components_.init, etc.) so benchmarks that use App work correctly.
|
||||
original_setup();
|
||||
|
||||
// Log functions call global_logger->log_vprintf_() without a null check,
|
||||
// so we must set up a Logger before any test that triggers logging.
|
||||
static esphome::logger::Logger test_logger(0);
|
||||
|
||||
Reference in New Issue
Block a user