| 59 | BENCHMARK(Render); |
| 60 | |
| 61 | static void UpdateCSS(benchmark::State& state) { |
| 62 | RuntimeWrapper wrapper(false); |
| 63 | wrapper.logger.setMinLogType(Valdi::LogTypeWarn); |
| 64 | wrapper.flushQueues(); |
| 65 | |
| 66 | auto context = wrapper.runtime->createContext(STRING_LITERAL("test"), STRING_LITERAL("CSSBenchmark"), Value()); |
| 67 | context->onCreate(); |
| 68 | auto tree = wrapper.runtime->createViewNodeTree(context); |
| 69 | wrapper.runtime->render(tree, nullptr); |
| 70 | |
| 71 | for (auto _ : state) { |
| 72 | state.PauseTiming(); |
| 73 | tree->getRootViewNode()->resetCssSubtree(); |
| 74 | state.ResumeTiming(); |
| 75 | |
| 76 | tree->updateCSS(nullptr); |
| 77 | } |
| 78 | } |
| 79 | BENCHMARK(UpdateCSS); |
| 80 | |
| 81 | BENCHMARK_MAIN(); |
nothing calls this directly
no test coverage detected