| 21 | BENCHMARK(CreateRenderAndDestroy); |
| 22 | |
| 23 | static void Destroy(benchmark::State& state) { |
| 24 | RuntimeWrapper wrapper(false); |
| 25 | wrapper.logger.setMinLogType(Valdi::LogTypeWarn); |
| 26 | wrapper.flushQueues(); |
| 27 | |
| 28 | auto context = wrapper.runtime->createContext(STRING_LITERAL("test"), STRING_LITERAL("CSSBenchmark"), Value()); |
| 29 | context->onCreate(); |
| 30 | |
| 31 | for (auto _ : state) { |
| 32 | state.PauseTiming(); |
| 33 | auto tree = wrapper.runtime->createViewNodeTree(context); |
| 34 | wrapper.runtime->render(tree, nullptr); |
| 35 | state.ResumeTiming(); |
| 36 | wrapper.runtime->destroyViewNodeTree(*tree); |
| 37 | } |
| 38 | } |
| 39 | BENCHMARK(Destroy); |
| 40 | |
| 41 | static void Render(benchmark::State& state) { |
nothing calls this directly
no test coverage detected