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

Function createExpectedNodes

internal/graph/graph_test.go:161–175  ·  view source on GitHub ↗

createExpectedNodes creates a slice of expectedNodes from nodes.

(nodes ...*Node)

Source from the content-addressed store, hash-verified

159
160// createExpectedNodes creates a slice of expectedNodes from nodes.
161func createExpectedNodes(nodes ...*Node) ([]expectedNode, NodePtrSet) {
162 expected := make([]expectedNode, len(nodes))
163 keep := make(NodePtrSet, len(nodes))
164
165 for i, node := range nodes {
166 expected[i] = expectedNode{
167 node: node,
168 in: make(EdgeMap),
169 out: make(EdgeMap),
170 }
171 keep[node] = true
172 }
173
174 return expected, keep
175}
176
177// createExpectedEdges creates directed edges from the parent to each of the
178// children.

Callers 4

createTestCase1Function · 0.85
createTestCase2Function · 0.85
createTestCase3Function · 0.85
createTestCase4Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…