MCPcopy Create free account
hub / github.com/FastLED/FastLED / benchmark_microseconds

Function benchmark_microseconds

tests/profile/benchmark_json_parsers.cpp:23–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21// Benchmark helper
22template<typename Func>
23double benchmark_microseconds(Func&& func, int iterations) {
24 // Warmup
25 func();
26
27 u32 start = fl::micros();
28 for (int i = 0; i < iterations; i++) {
29 func();
30 }
31 u32 end = fl::micros();
32
33 return static_cast<double>(end - start) / iterations;
34}
35
36void run_benchmark(const char* test_name, const fl::string& json_data, int iterations, bool& success) {
37 printf("\n");

Callers 1

run_benchmarkFunction · 0.70

Calls 1

microsFunction · 0.50

Tested by

no test coverage detected