MCPcopy Index your code
hub / github.com/parca-dev/parca / string

Method string

pkg/query/pprof.go:88–97  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

86}
87
88func (w *PprofWriter) string(s string) int64 {
89 if idx, ok := w.stringTableIndex[s]; ok {
90 return idx
91 }
92
93 idx := int64(len(w.res.StringTable))
94 w.res.StringTable = append(w.res.StringTable, s)
95 w.stringTableIndex[s] = idx
96 return idx
97}
98
99func (w *PprofWriter) byteString(s []byte) int64 {
100 if idx, ok := w.stringTableIndex[unsafeString(s)]; ok {

Callers 15

NewPprofWriterFunction · 0.95
transposeMethod · 0.95
internalBinaryReadMethod · 0.80
internalBinaryWriteMethod · 0.80
binaryReadMap1Method · 0.80
internalBinaryWriteMethod · 0.80
internalBinaryReadMethod · 0.80
internalBinaryWriteMethod · 0.80
internalBinaryReadMethod · 0.80
internalBinaryWriteMethod · 0.80
internalBinaryReadMethod · 0.80
internalBinaryWriteMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected