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

Function parseString

profile/legacy_profile_test.go:86–97  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

84}
85
86func parseString(b []byte) (uint64, []byte) {
87 slices := bytes.SplitN(b, []byte(":"), 2)
88 var value, remainder []byte
89 if len(slices) > 0 {
90 value = slices[0]
91 }
92 if len(slices) > 1 {
93 remainder = slices[1]
94 }
95 v, _ := strconv.ParseUint(string(value), 10, 64)
96 return v, remainder
97}
98
99func checkTestSample(p *Profile, want []uint64) error {
100 for _, s := range p.Sample {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…