MCPcopy Create free account
hub / github.com/google/pprof / checkCalls

Function checkCalls

browsertests/testdata/testflame.js:38–52  ·  view source on GitHub ↗
(a, b, gap = 0)

Source from the content-addressed store, hash-verified

36 // text b to indicate a call from a to b. Expect a gap of the specified
37 // number of rows.
38 function checkCalls(a, b, gap = 0) {
39 test.setContext("checkCalls", a, b, gap);
40 const ra = rect(a);
41 const rb = rect(b);
42 if (!ra || !rb) return;
43
44 const pixelGap = gap * rb.height;
45 if (rb.top != ra.bottom + pixelGap) {
46 test.err("not above");
47 }
48 // TODO: Allow checking boxes above pivots.
49 if (rb.left < ra.left || rb.right > ra.right) {
50 test.err("horizontal span of", a, "is not nested inside horizontal span of", b);
51 }
52 }
53
54 // checkWidth checks that the width of the box with text t is approximately
55 // the specified fraction of the total width.

Callers 1

TestFlameFunction · 0.85

Calls 3

rectFunction · 0.85
setContextMethod · 0.80
errMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…