MCPcopy Index your code
hub / github.com/subtrace/subtrace / Read

Method Read

tracer/parser.go:545–560  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

543}
544
545func (s *sampler) Read(b []byte) (int, error) {
546 n, err := s.orig.Read(b)
547 if err != nil {
548 s.setError(err)
549 }
550
551 if n > 0 && s.used < PayloadLimitBytes {
552 c := int64(n)
553 if s.used+c > PayloadLimitBytes {
554 s.over = true
555 c = PayloadLimitBytes - s.used
556 }
557 s.used += int64(copy(s.data[s.used:s.used+c], b[0:c]))
558 }
559 return n, err
560}
561
562func (s *sampler) Close() error {
563 err := s.orig.Close()

Callers 3

dialSingleMethod · 0.45
doInsertFunction · 0.45
websocketMethod · 0.45

Calls 1

setErrorMethod · 0.95

Tested by

no test coverage detected