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

Function ParseHeapDump

valdi/test/benchmark/JavaScriptHeapDump_benchmark.cpp:50–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48BENCHMARK(BuildHeapDump);
49
50static void ParseHeapDump(benchmark::State& state) {
51 BenchmarkHelper helper;
52 JavaScriptHeapDumpBuilder builder;
53 helper.populateHeapDumpBuilder(builder);
54 auto heapDump = builder.build();
55
56 for (auto _ : state) {
57 SimpleExceptionTracker exceptionTracker;
58 JavaScriptHeapDumpParser parser(heapDump.data(), heapDump.size(), exceptionTracker);
59
60 for (const auto& node : parser.getNodes()) {
61 for (const auto& edge : node.getEdges()) {
62 benchmark::DoNotOptimize(edge.getIdentifier());
63 }
64 }
65 }
66}
67BENCHMARK(ParseHeapDump);
68
69static void MergeHeapDump(benchmark::State& state) {

Callers

nothing calls this directly

Calls 7

getNodesMethod · 0.80
getEdgesMethod · 0.80
getIdentifierMethod · 0.65
buildMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected