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

Method Write

profile/profile.go:345–350  ·  view source on GitHub ↗

Write writes the profile as a gzip-compressed marshaled protobuf.

(w io.Writer)

Source from the content-addressed store, hash-verified

343
344// Write writes the profile as a gzip-compressed marshaled protobuf.
345func (p *Profile) Write(w io.Writer) error {
346 zw := gzip.NewWriter(w)
347 defer zw.Close()
348 _, err := zw.Write(serialize(p))
349 return err
350}
351
352// WriteUncompressed writes the profile as a marshaled protobuf.
353func (p *Profile) WriteUncompressed(w io.Writer) error {

Callers 15

printTopProtoFunction · 0.95
sampleKeyMethod · 0.80
WriteUncompressedMethod · 0.80
TestMarshalUnmarshalFunction · 0.80
TestParseFunction · 0.80
TestParseConcatentatedFunction · 0.80
leaveTempfileFunction · 0.80
TestEncodeDecodeDocURLFunction · 0.80
TestThreadSafetyFunction · 0.80
DiffFunction · 0.80
fakeELFFileFunction · 0.80

Calls 2

serializeFunction · 0.85
CloseMethod · 0.65

Tested by 8

TestMarshalUnmarshalFunction · 0.64
TestParseFunction · 0.64
TestParseConcatentatedFunction · 0.64
leaveTempfileFunction · 0.64
TestEncodeDecodeDocURLFunction · 0.64
TestThreadSafetyFunction · 0.64
fakeELFFileFunction · 0.64