New summarizes performance data from a profile into a graph.
(prof *profile.Profile, o *Options)
| 328 | |
| 329 | // New summarizes performance data from a profile into a graph. |
| 330 | func New(prof *profile.Profile, o *Options) *Graph { |
| 331 | if o.CallTree { |
| 332 | return newTree(prof, o) |
| 333 | } |
| 334 | g, _ := newGraph(prof, o) |
| 335 | return g |
| 336 | } |
| 337 | |
| 338 | // newGraph computes a graph from a profile. It returns the graph, and |
| 339 | // a map from the profile location indices to the corresponding graph |