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

Function TestAggregation

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

Source from the content-addressed store, hash-verified

654const totalSamples = int64(11112)
655
656func TestAggregation(t *testing.T) {
657 prof := testProfile6.Copy()
658 for _, resolution := range []string{"precise", "columns", "fileline", "inline_function", "function"} {
659 a := aggTests[resolution]
660 if !a.precise {
661 if err := prof.Aggregate(a.inlineFrame, a.function, a.fileline, a.fileline, a.column, false); err != nil {
662 t.Error("aggregating to " + resolution + ":" + err.Error())
663 }
664 }
665 if err := checkAggregation(prof, &a); err != nil {
666 t.Error("failed aggregation to " + resolution + ": " + err.Error())
667 }
668 }
669}
670
671// checkAggregation verifies that the profile remained consistent
672// with its aggregation.

Callers

nothing calls this directly

Calls 3

checkAggregationFunction · 0.85
CopyMethod · 0.80
AggregateMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…