| 39 | BENCHMARK(Destroy); |
| 40 | |
| 41 | static void Render(benchmark::State& state) { |
| 42 | RuntimeWrapper wrapper(false); |
| 43 | wrapper.logger.setMinLogType(Valdi::LogTypeWarn); |
| 44 | wrapper.flushQueues(); |
| 45 | |
| 46 | auto context = wrapper.runtime->createContext(STRING_LITERAL("test"), STRING_LITERAL("CSSBenchmark"), Value()); |
| 47 | context->onCreate(); |
| 48 | |
| 49 | for (auto _ : state) { |
| 50 | state.PauseTiming(); |
| 51 | auto tree = wrapper.runtime->createViewNodeTree(context); |
| 52 | state.ResumeTiming(); |
| 53 | wrapper.runtime->render(tree, nullptr); |
| 54 | state.PauseTiming(); |
| 55 | wrapper.runtime->destroyViewNodeTree(*tree); |
| 56 | state.ResumeTiming(); |
| 57 | } |
| 58 | } |
| 59 | BENCHMARK(Render); |
| 60 | |
| 61 | static void UpdateCSS(benchmark::State& state) { |
nothing calls this directly
no test coverage detected