Merge branch 'bench-number-select-switch' into select-switch-logv-downgrade

This commit is contained in:
J. Nick Koston
2026-04-02 14:55:04 -10:00
committed by GitHub
2 changed files with 1 additions and 6 deletions
@@ -7,7 +7,7 @@ namespace esphome::benchmarks {
// Inner iteration count to amortize CodSpeed instrumentation overhead.
static constexpr int kInnerIterations = 2000;
// Minimal Number for benchmarking — control() is a no-op.
// Minimal Number for benchmarking — control() publishes the value back.
class BenchNumber : public number::Number {
public:
void configure(const char *name) { this->configure_entity_(name, 0x12345678, 0); }
@@ -16,11 +16,6 @@ class BenchSelect : public select::Select {
void control(size_t index) override { this->publish_state(index); }
};
// Option lists matching real Apollo R-PRO-1 usage patterns.
static constexpr const char *kSmallOptions[] = {"off", "on", "auto"};
static constexpr const char *kLargeOptions[] = {"off", "still", "move", "still+move", "custom1",
"custom2", "custom3", "custom4", "custom5", "custom6"};
// Helper to create a select with the given options.
static void setup_select(BenchSelect &select, const char *name, std::initializer_list<const char *> options) {
select.configure(name);