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

Function TestTrimTree

internal/graph/graph_test.go:325–336  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

323}
324
325func TestTrimTree(t *testing.T) {
326 tests := createTrimTreeTestCases()
327 for _, test := range tests {
328 graph := test.initial
329 graph.TrimTree(test.keep)
330 if !graphsEqual(graph, test.expected) {
331 t.Fatalf("Graphs do not match.\nExpected: %s\nFound: %s\n",
332 expectedNodesDebugString(test.expected),
333 graphDebugString(graph))
334 }
335 }
336}
337
338func nodeTestProfile() *profile.Profile {
339 mappings := []*profile.Mapping{

Callers

nothing calls this directly

Calls 5

createTrimTreeTestCasesFunction · 0.85
graphsEqualFunction · 0.85
expectedNodesDebugStringFunction · 0.85
graphDebugStringFunction · 0.85
TrimTreeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…