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

Function TestMergeMain

profile/profile_test.go:802–811  ·  view source on GitHub ↗

TestMergeMain tests merge leaves the main binary in place.

(t *testing.T)

Source from the content-addressed store, hash-verified

800
801// TestMergeMain tests merge leaves the main binary in place.
802func TestMergeMain(t *testing.T) {
803 prof := testProfile1.Copy()
804 p1, err := Merge([]*Profile{prof})
805 if err != nil {
806 t.Fatalf("merge error: %v", err)
807 }
808 if cpuM[0].File != p1.Mapping[0].File {
809 t.Errorf("want Mapping[0]=%s got %s", cpuM[0].File, p1.Mapping[0].File)
810 }
811}
812
813func TestMerge(t *testing.T) {
814 // Aggregate a profile with itself and once again with a factor of

Callers

nothing calls this directly

Calls 2

MergeFunction · 0.85
CopyMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…