MCPcopy Create free account
hub / github.com/Snapchat/Valdi / UpdateCSS

Function UpdateCSS

valdi/test/benchmark/runtime_benchmark.cpp:61–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59BENCHMARK(Render);
60
61static 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}
79BENCHMARK(UpdateCSS);
80
81BENCHMARK_MAIN();

Callers

nothing calls this directly

Calls 9

setMinLogTypeMethod · 0.80
createViewNodeTreeMethod · 0.80
createContextMethod · 0.65
onCreateMethod · 0.65
renderMethod · 0.65
ValueInterface · 0.50
flushQueuesMethod · 0.45
getRootViewNodeMethod · 0.45
updateCSSMethod · 0.45

Tested by

no test coverage detected