MCPcopy
hub / github.com/grafana/tempo / Unmarshal

Method Unmarshal

pkg/tempopb/tempo.pb.go:9386–9568  ·  view source on GitHub ↗
(dAtA []byte)

Source from the content-addressed store, hash-verified

9384 return nil
9385}
9386func (m *SearchMetrics) Unmarshal(dAtA []byte) error {
9387 l := len(dAtA)
9388 iNdEx := 0
9389 for iNdEx < l {
9390 preIndex := iNdEx
9391 var wire uint64
9392 for shift := uint(0); ; shift += 7 {
9393 if shift >= 64 {
9394 return ErrIntOverflowTempo
9395 }
9396 if iNdEx >= l {
9397 return io.ErrUnexpectedEOF
9398 }
9399 b := dAtA[iNdEx]
9400 iNdEx++
9401 wire |= uint64(b&0x7F) << shift
9402 if b < 0x80 {
9403 break
9404 }
9405 }
9406 fieldNum := int32(wire >> 3)
9407 wireType := int(wire & 0x7)
9408 if wireType == 4 {
9409 return fmt.Errorf("proto: SearchMetrics: wiretype end group for non-group")
9410 }
9411 if fieldNum <= 0 {
9412 return fmt.Errorf("proto: SearchMetrics: illegal tag %d (wire type %d)", fieldNum, wire)
9413 }
9414 switch fieldNum {
9415 case 1:
9416 if wireType != 0 {
9417 return fmt.Errorf("proto: wrong wireType = %d for field InspectedTraces", wireType)
9418 }
9419 m.InspectedTraces = 0
9420 for shift := uint(0); ; shift += 7 {
9421 if shift >= 64 {
9422 return ErrIntOverflowTempo
9423 }
9424 if iNdEx >= l {
9425 return io.ErrUnexpectedEOF
9426 }
9427 b := dAtA[iNdEx]
9428 iNdEx++
9429 m.InspectedTraces |= uint32(b&0x7F) << shift
9430 if b < 0x80 {
9431 break
9432 }
9433 }
9434 case 2:
9435 if wireType != 0 {
9436 return fmt.Errorf("proto: wrong wireType = %d for field InspectedBytes", wireType)
9437 }
9438 m.InspectedBytes = 0
9439 for shift := uint(0); ; shift += 7 {
9440 if shift >= 64 {
9441 return ErrIntOverflowTempo
9442 }
9443 if iNdEx >= l {

Callers 1

XXX_UnmarshalMethod · 0.95

Calls 1

skipTempoFunction · 0.85

Tested by

no test coverage detected