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

Function cpuProfileSmall

internal/driver/driver_test.go:706–778  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

704}
705
706func cpuProfileSmall() *profile.Profile {
707 var cpuM = []*profile.Mapping{
708 {
709 ID: 1,
710 Start: 0x1000,
711 Limit: 0x4000,
712 File: "/path/to/testbinary",
713 HasFunctions: true,
714 HasFilenames: true,
715 HasLineNumbers: true,
716 HasInlineFrames: true,
717 },
718 }
719
720 var cpuL = []*profile.Location{
721 {
722 ID: 1000,
723 Mapping: cpuM[0],
724 Address: 0x1000,
725 },
726 {
727 ID: 2000,
728 Mapping: cpuM[0],
729 Address: 0x2000,
730 },
731 {
732 ID: 3000,
733 Mapping: cpuM[0],
734 Address: 0x3000,
735 },
736 {
737 ID: 4000,
738 Mapping: cpuM[0],
739 Address: 0x4000,
740 },
741 {
742 ID: 5000,
743 Mapping: cpuM[0],
744 Address: 0x5000,
745 },
746 }
747
748 return &profile.Profile{
749 PeriodType: &profile.ValueType{Type: "cpu", Unit: "milliseconds"},
750 Period: 1,
751 DurationNanos: 10e9,
752 SampleType: []*profile.ValueType{
753 {Type: "samples", Unit: "count"},
754 {Type: "cpu", Unit: "milliseconds"},
755 },
756 Sample: []*profile.Sample{
757 {
758 Location: []*profile.Location{cpuL[0], cpuL[1], cpuL[2]},
759 Value: []int64{1000, 1000},
760 },
761 {
762 Location: []*profile.Location{cpuL[3], cpuL[1], cpuL[4]},
763 Value: []int64{1000, 1000},

Callers 1

FetchMethod · 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…