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

Function solutionFilename

internal/driver/driver_test.go:264–289  ·  view source on GitHub ↗

solutionFilename returns the name of the solution file for the test

(source string, f *testFlags)

Source from the content-addressed store, hash-verified

262
263// solutionFilename returns the name of the solution file for the test
264func solutionFilename(source string, f *testFlags) string {
265 name := []string{"pprof", strings.TrimPrefix(source, testSourceURL(8000))}
266 name = addString(name, f, []string{"flat", "cum"})
267 name = addString(name, f, []string{"functions", "filefunctions", "files", "lines", "addresses"})
268 name = addString(name, f, []string{"noinlines"})
269 name = addString(name, f, []string{"inuse_space", "inuse_objects", "alloc_space", "alloc_objects"})
270 name = addString(name, f, []string{"relative_percentages"})
271 name = addString(name, f, []string{"seconds"})
272 name = addString(name, f, []string{"call_tree"})
273 name = addString(name, f, []string{"text", "tree", "callgrind", "dot", "svg", "tags", "dot", "traces", "disasm", "peek", "weblist", "topproto", "comments"})
274 name = addString(name, f, []string{"all_frames"})
275 if f.strings["focus"] != "" || f.strings["tagfocus"] != "" {
276 name = append(name, "focus")
277 }
278 if f.strings["ignore"] != "" || f.strings["tagignore"] != "" {
279 name = append(name, "ignore")
280 }
281 if f.strings["show_from"] != "" {
282 name = append(name, "show_from")
283 }
284 name = addString(name, f, []string{"hide", "show"})
285 if f.strings["unit"] != "minimum" {
286 name = addString(name, f, []string{"unit"})
287 }
288 return strings.Join(name, ".")
289}
290
291func addString(name []string, f *testFlags, components []string) []string {
292 for _, c := range components {

Callers 1

TestParseFunction · 0.85

Calls 2

testSourceURLFunction · 0.85
addStringFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…