| 5 | using namespace ValdiTest; |
| 6 | |
| 7 | static void CreateRenderAndDestroy(benchmark::State& state) { |
| 8 | RuntimeWrapper wrapper(false); |
| 9 | wrapper.logger.setMinLogType(Valdi::LogTypeWarn); |
| 10 | wrapper.flushQueues(); |
| 11 | |
| 12 | auto context = wrapper.runtime->createContext(STRING_LITERAL("test"), STRING_LITERAL("CSSBenchmark"), Value()); |
| 13 | context->onCreate(); |
| 14 | |
| 15 | for (auto _ : state) { |
| 16 | auto tree = wrapper.runtime->createViewNodeTree(context); |
| 17 | wrapper.runtime->render(tree, nullptr); |
| 18 | wrapper.runtime->destroyViewNodeTree(*tree); |
| 19 | } |
| 20 | } |
| 21 | BENCHMARK(CreateRenderAndDestroy); |
| 22 | |
| 23 | static void Destroy(benchmark::State& state) { |
nothing calls this directly
no test coverage detected