mirror of
https://github.com/esphome/esphome.git
synced 2026-10-06 19:06:37 +00:00
[api] Add warm batch benchmark and bench_clear_batch friend
Add SendSensorState_Batch_Warm that pre-warms the deferred batch vector before benchmarking to isolate steady-state cost from allocation.
This commit is contained in:
@@ -46,12 +46,14 @@ static_assert(MAX_MESSAGES_PER_BATCH >= MAX_INITIAL_PER_BATCH,
|
||||
|
||||
class APIConnection;
|
||||
void bench_enable_immediate_send(APIConnection *conn); // tests/benchmarks
|
||||
void bench_clear_batch(APIConnection *conn); // tests/benchmarks
|
||||
|
||||
class APIConnection final : public APIServerConnectionBase {
|
||||
public:
|
||||
friend class APIServer;
|
||||
friend class ListEntitiesIterator;
|
||||
friend void bench_enable_immediate_send(APIConnection *conn);
|
||||
friend void bench_clear_batch(APIConnection *conn);
|
||||
APIConnection(std::unique_ptr<socket::Socket> socket, APIServer *parent);
|
||||
~APIConnection();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user