| 21 | // Benchmark helper |
| 22 | template<typename Func> |
| 23 | double 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 | |
| 36 | void run_benchmark(const char* test_name, const fl::string& json_data, int iterations, bool& success) { |
| 37 | printf("\n"); |
no test coverage detected