mirror of
https://github.com/esphome/esphome.git
synced 2026-09-15 09:08:41 +00:00
[benchmark] Fix plaintext frame benchmark build: enable api codegen
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
from tests.testing_helpers import ComponentManifestOverride
|
||||
|
||||
|
||||
def override_manifest(manifest: ComponentManifestOverride) -> None:
|
||||
# api must run its to_code during benchmark builds because it
|
||||
# defines USE_API, USE_API_PLAINTEXT, and USE_API_NOISE which
|
||||
# are needed by the frame helper headers.
|
||||
manifest.enable_codegen()
|
||||
@@ -1,3 +1,6 @@
|
||||
#include "esphome/core/defines.h"
|
||||
#ifdef USE_API_PLAINTEXT
|
||||
|
||||
#include <benchmark/benchmark.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/socket.h>
|
||||
@@ -122,3 +125,5 @@ static void PlaintextFrame_WriteBatch5(benchmark::State &state) {
|
||||
BENCHMARK(PlaintextFrame_WriteBatch5);
|
||||
|
||||
} // namespace esphome::api::benchmarks
|
||||
|
||||
#endif // USE_API_PLAINTEXT
|
||||
|
||||
Reference in New Issue
Block a user