// TotalTime parses the profile data and returns the accumulated time. // The input should not be gzipped. func TotalTime(data []byte) (total time.Duration, err error) { … } const wireVarint … const wireBytes … const fldProfileSample … const fldSampleValue … const msgProfile … const msgSample … func decode(total *time.Duration, data []byte, msg int) { … } func varint(data *[]byte) (v uint64) { … }