type commands … type command … // help returns a help string for a command. func (c *command) help(name string) string { … } // AddCommand adds an additional command to the set of commands // accepted by pprof. This enables extensions to add new commands for // specialized visualization formats. If the command specified already // exists, it is overwritten. func AddCommand(cmd string, format int, post PostProcessor, desc, usage string) { … } // SetVariableDefault sets the default value for a pprof // variable. This enables extensions to set their own defaults. func SetVariableDefault(variable, value string) { … } type PostProcessor … var interactiveMode … var pprofCommands … var configHelp … func helpText(s ...string) string { … } // usage returns a string describing the pprof commands and configuration // options. if commandLine is set, the output reflect cli usage. func usage(commandLine bool) string { … } func reportHelp(c string, cum, redirect bool) string { … } func listHelp(c string, redirect bool) string { … } // browsers returns a list of commands to attempt for web visualization. func browsers() []string { … } var kcachegrind … // awayFromTTY saves the output in a file if it would otherwise go to // the terminal screen. This is used to avoid dumping binary data on // the screen. func awayFromTTY(format string) PostProcessor { … } func invokeDot(format string) PostProcessor { … } // massageDotSVG invokes the dot tool to generate an SVG image and alters // the image to have panning capabilities when viewed in a browser. func massageDotSVG() PostProcessor { … } func invokeVisualizer(suffix string, visualizers []string) PostProcessor { … } // stringToBool is a custom parser for bools. We avoid using strconv.ParseBool // to remain compatible with old pprof behavior (e.g., treating "" as true). func stringToBool(s string) (bool, error) { … }