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

Interface UI

driver/driver.go:206–232  ·  view source on GitHub ↗

A UI manages user interactions.

Source from the content-addressed store, hash-verified

204
205// A UI manages user interactions.
206type UI interface {
207 // ReadLine returns a line of text (a command) read from the user.
208 // prompt is printed before reading the command.
209 ReadLine(prompt string) (string, error)
210
211 // Print shows a message to the user.
212 // It formats the text as fmt.Print would and adds a final \n if not already present.
213 // For line-based UI, Print writes to standard error.
214 // (Standard output is reserved for report data.)
215 Print(...interface{})
216
217 // PrintErr shows an error message to the user.
218 // It formats the text as fmt.Print would and adds a final \n if not already present.
219 // For line-based UI, PrintErr writes to standard error.
220 PrintErr(...interface{})
221
222 // IsTerminal returns whether the UI is known to be tied to an
223 // interactive terminal (as opposed to being redirected to a file).
224 IsTerminal() bool
225
226 // WantBrowser indicates whether browser should be opened with the -http option.
227 WantBrowser() bool
228
229 // SetAutoComplete instructs the UI to call complete(cmd) to obtain
230 // the auto-completion of cmd, if the UI supports auto-completion at all.
231 SetAutoComplete(complete func(string) string)
232}
233
234// internalObjTool is a wrapper to map from the pprof external
235// interface to the internal interface.

Callers 21

interactiveFunction · 0.65
fetchFunction · 0.65
convertPerfDataFunction · 0.65
serveWebInterfaceFunction · 0.65
parseFlagsFunction · 0.65
greetingsFunction · 0.65
printCurrentOptionsFunction · 0.65
commandHelpFunction · 0.65
awayFromTTYFunction · 0.65
compileTagFilterFunction · 0.65
warnNoMatchesFunction · 0.65
fetchProfilesFunction · 0.65

Implementers 4

readlineUIpprof.go
TestUIinternal/proftest/proftest.go
stdUIinternal/driver/options.go
testUIbrowsertests/testutils.go

Calls

no outgoing calls

Tested by

no test coverage detected