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

Function Render

valdi/test/benchmark/runtime_benchmark.cpp:41–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39BENCHMARK(Destroy);
40
41static 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}
59BENCHMARK(Render);
60
61static void UpdateCSS(benchmark::State& state) {

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected