MCPcopy
hub / github.com/grafana/dskit / Size

Method Size

middleware/middleware_test/echo_server.pb.go:293–304  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

291 return base
292}
293func (m *Msg) Size() (n int) {
294 if m == nil {
295 return 0
296 }
297 var l int
298 _ = l
299 l = len(m.Body)
300 if l > 0 {
301 n += 1 + l + sovEchoServer(uint64(l))
302 }
303 return n
304}
305
306func sovEchoServer(x uint64) (n int) {
307 return (math_bits.Len64(x|1) + 6) / 7

Callers 4

TestGrpcStatsStreamingFunction · 0.95
XXX_SizeMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 1

sovEchoServerFunction · 0.85

Tested by 1

TestGrpcStatsStreamingFunction · 0.76