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

Function nodeTestProfile

internal/graph/graph_test.go:338–400  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

336}
337
338func nodeTestProfile() *profile.Profile {
339 mappings := []*profile.Mapping{
340 {
341 ID: 1,
342 File: "symbolized_binary",
343 },
344 {
345 ID: 2,
346 File: "unsymbolized_library_1",
347 },
348 {
349 ID: 3,
350 File: "unsymbolized_library_2",
351 },
352 }
353 functions := []*profile.Function{
354 {ID: 1, Name: "symname"},
355 {ID: 2},
356 }
357 locations := []*profile.Location{
358 {
359 ID: 1,
360 Mapping: mappings[0],
361 Line: []profile.Line{
362 {Function: functions[0]},
363 },
364 },
365 {
366 ID: 2,
367 Mapping: mappings[1],
368 Line: []profile.Line{
369 {Function: functions[1]},
370 },
371 },
372 {
373 ID: 3,
374 Mapping: mappings[2],
375 },
376 }
377 return &profile.Profile{
378 PeriodType: &profile.ValueType{Type: "cpu", Unit: "milliseconds"},
379 SampleType: []*profile.ValueType{
380 {Type: "type", Unit: "unit"},
381 },
382 Sample: []*profile.Sample{
383 {
384 Location: []*profile.Location{locations[0]},
385 Value: []int64{1},
386 },
387 {
388 Location: []*profile.Location{locations[1]},
389 Value: []int64{1},
390 },
391 {
392 Location: []*profile.Location{locations[2]},
393 Value: []int64{1},
394 },
395 },

Callers 1

TestCreateNodesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…