generate a machine-readable call graph using the dynamic profile of my
program. When I run "go tool pprof" with the -tree option, I see this
I want precisely this information in a machine readable form. Specifically,
I want to take a profile and generate a graph such that:
- Nodes are functions
- Directed edges between nodes represent that one function called another
- The weight of edges represent the percent of calls from one function
to another (exactly like the last column in the image above)
I have thought of a few potential options:
- Parse the string output of "go tool pprof --tree"
- Copy the code in the cmd/pprof library which generates a graph from a
However, I don't love either of these options because they can break in
future versions of go if the pprof reporting format changes. Are there any
alternatives I should consider? For example, could I use the -proto option
to get a protobuf file including the graph?
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
For more options, visit https://groups.google.com/d/optout.