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

Method Copy

profile/profile.go:865–875  ·  view source on GitHub ↗

Copy makes a fully independent copy of a profile.

()

Source from the content-addressed store, hash-verified

863
864// Copy makes a fully independent copy of a profile.
865func (p *Profile) Copy() *Profile {
866 pp := &Profile{}
867 if err := unmarshal(serialize(p), pp); err != nil {
868 panic(err)
869 }
870 if err := pp.postDecode(); err != nil {
871 panic(err)
872 }
873
874 return pp
875}

Callers 15

TestPruneFunction · 0.80
TestFilterSamplesByNameFunction · 0.80
TestShowFromFunction · 0.80
TestTagFilterFunction · 0.80
TestParseConcatentatedFunction · 0.80
TestCheckValidFunction · 0.80
TestAggregationFunction · 0.80
TestScaleFunction · 0.80
TestMergeMainFunction · 0.80
TestMergeFunction · 0.80
TestMergeAllFunction · 0.80
TestIsFoldedMergeFunction · 0.80

Calls 3

postDecodeMethod · 0.95
unmarshalFunction · 0.85
serializeFunction · 0.85

Tested by 15

TestPruneFunction · 0.64
TestFilterSamplesByNameFunction · 0.64
TestShowFromFunction · 0.64
TestTagFilterFunction · 0.64
TestParseConcatentatedFunction · 0.64
TestCheckValidFunction · 0.64
TestAggregationFunction · 0.64
TestScaleFunction · 0.64
TestMergeMainFunction · 0.64
TestMergeFunction · 0.64
TestMergeAllFunction · 0.64
TestIsFoldedMergeFunction · 0.64