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

Function baseGraph

internal/graph/dotgraph_test.go:166–198  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164}
165
166func baseGraph() *Graph {
167 src := &Node{
168 Info: NodeInfo{Name: "src"},
169 Flat: 10,
170 Cum: 25,
171 In: make(EdgeMap),
172 Out: make(EdgeMap),
173 LabelTags: make(TagMap),
174 NumericTags: make(map[string]TagMap),
175 }
176 dest := &Node{
177 Info: NodeInfo{Name: "dest"},
178 Flat: 15,
179 Cum: 25,
180 In: make(EdgeMap),
181 Out: make(EdgeMap),
182 LabelTags: make(TagMap),
183 NumericTags: make(map[string]TagMap),
184 }
185 edge := &Edge{
186 Src: src,
187 Dest: dest,
188 Weight: 10,
189 }
190 src.Out[dest] = edge
191 src.In[src] = edge
192 return &Graph{
193 Nodes: Nodes{
194 src,
195 dest,
196 },
197 }
198}
199
200func baseAttrsAndConfig() (*DotAttributes, *DotConfig) {
201 a := &DotAttributes{

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…