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

Function TestNormalizeBySameProfile

profile/profile_test.go:997–1013  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

995}
996
997func TestNormalizeBySameProfile(t *testing.T) {
998 pb := testProfile1.Copy()
999 p := testProfile1.Copy()
1000
1001 if err := p.Normalize(pb); err != nil {
1002 t.Fatal(err)
1003 }
1004
1005 for i, s := range p.Sample {
1006 for j, v := range s.Value {
1007 expectedSampleValue := testProfile1.Sample[i].Value[j]
1008 if v != expectedSampleValue {
1009 t.Errorf("For sample %d, value %d want %d got %d", i, j, expectedSampleValue, v)
1010 }
1011 }
1012 }
1013}
1014
1015func TestNormalizeByDifferentProfile(t *testing.T) {
1016 p := testProfile1.Copy()

Callers

nothing calls this directly

Calls 2

CopyMethod · 0.80
NormalizeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…