github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/util/admission/admissionpb/admission_stats.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: util/admission/admissionpb/admission_stats.proto
     3  
     4  package admissionpb
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/gogo/protobuf/gogoproto"
     9  	proto "github.com/gogo/protobuf/proto"
    10  	io "io"
    11  	math "math"
    12  	math_bits "math/bits"
    13  	time "time"
    14  )
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  var _ = time.Kitchen
    21  
    22  // This is a compile-time assertion to ensure that this generated file
    23  // is compatible with the proto package it is being compiled against.
    24  // A compilation error at this line likely means your copy of the
    25  // proto package needs to be updated.
    26  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    27  
    28  // AdmissionWorkQueueStats is recorded for work items waiting in the admission
    29  // work queue.
    30  type AdmissionWorkQueueStats struct {
    31  	// Duration spent waiting.
    32  	WaitDurationNanos time.Duration `protobuf:"varint,1,opt,name=wait_duration_nanos,json=waitDurationNanos,proto3,casttype=time.Duration" json:"wait_duration_nanos,omitempty"`
    33  	// String representation of admission queue kind.
    34  	QueueKind string `protobuf:"bytes,2,opt,name=queue_kind,json=queueKind,proto3" json:"queue_kind,omitempty"`
    35  	// Set to true if deadline was exceeded.
    36  	DeadlineExceeded bool `protobuf:"varint,3,opt,name=deadline_exceeded,json=deadlineExceeded,proto3" json:"deadline_exceeded,omitempty"`
    37  	// String representation of work priority.
    38  	WorkPriority string `protobuf:"bytes,4,opt,name=work_priority,json=workPriority,proto3" json:"work_priority,omitempty"`
    39  }
    40  
    41  func (m *AdmissionWorkQueueStats) Reset()         { *m = AdmissionWorkQueueStats{} }
    42  func (m *AdmissionWorkQueueStats) String() string { return proto.CompactTextString(m) }
    43  func (*AdmissionWorkQueueStats) ProtoMessage()    {}
    44  func (*AdmissionWorkQueueStats) Descriptor() ([]byte, []int) {
    45  	return fileDescriptor_695e7752d0aa7c6e, []int{0}
    46  }
    47  func (m *AdmissionWorkQueueStats) XXX_Unmarshal(b []byte) error {
    48  	return m.Unmarshal(b)
    49  }
    50  func (m *AdmissionWorkQueueStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    51  	b = b[:cap(b)]
    52  	n, err := m.MarshalToSizedBuffer(b)
    53  	if err != nil {
    54  		return nil, err
    55  	}
    56  	return b[:n], nil
    57  }
    58  func (m *AdmissionWorkQueueStats) XXX_Merge(src proto.Message) {
    59  	xxx_messageInfo_AdmissionWorkQueueStats.Merge(m, src)
    60  }
    61  func (m *AdmissionWorkQueueStats) XXX_Size() int {
    62  	return m.Size()
    63  }
    64  func (m *AdmissionWorkQueueStats) XXX_DiscardUnknown() {
    65  	xxx_messageInfo_AdmissionWorkQueueStats.DiscardUnknown(m)
    66  }
    67  
    68  var xxx_messageInfo_AdmissionWorkQueueStats proto.InternalMessageInfo
    69  
    70  func init() {
    71  	proto.RegisterType((*AdmissionWorkQueueStats)(nil), "cockroach.parser.util.admission.admissionpb.AdmissionWorkQueueStats")
    72  }
    73  
    74  func init() {
    75  	proto.RegisterFile("util/admission/admissionpb/admission_stats.proto", fileDescriptor_695e7752d0aa7c6e)
    76  }
    77  
    78  var fileDescriptor_695e7752d0aa7c6e = []byte{
    79  	// 313 bytes of a gzipped FileDescriptorProto
    80  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x4a, 0xf3, 0x40,
    81  	0x14, 0x85, 0x33, 0x7f, 0x7f, 0xc4, 0x0e, 0x16, 0x6c, 0x14, 0x0c, 0x82, 0x63, 0x51, 0x17, 0x05,
    82  	0x61, 0x22, 0xf8, 0x00, 0xd2, 0xa2, 0x2b, 0x41, 0xb4, 0x2e, 0x04, 0x37, 0x61, 0x92, 0x19, 0xd2,
    83  	0x21, 0xed, 0xdc, 0x38, 0x99, 0x50, 0x7d, 0x0b, 0x1f, 0xab, 0x1b, 0xa1, 0xcb, 0xae, 0x44, 0xd3,
    84  	0xb7, 0x70, 0x25, 0x13, 0x93, 0xc6, 0x8d, 0xbb, 0x33, 0xe7, 0x9e, 0xef, 0x0c, 0xdc, 0x8b, 0xcf,
    85  	0x72, 0x23, 0x27, 0x3e, 0xe3, 0x53, 0x99, 0x65, 0x12, 0x54, 0xa3, 0xd2, 0xb0, 0xd1, 0x41, 0x66,
    86  	0x98, 0xc9, 0x68, 0xaa, 0xc1, 0x80, 0x7b, 0x12, 0x41, 0x94, 0x68, 0x60, 0xd1, 0x98, 0x5a, 0x96,
    87  	0xae, 0x53, 0xf4, 0x17, 0xbb, 0xbf, 0x1b, 0x43, 0x0c, 0x25, 0xe0, 0x5b, 0xf5, 0xc3, 0x1e, 0xbd,
    88  	0x21, 0xbc, 0x37, 0xa8, 0x53, 0x0f, 0xa0, 0x93, 0xbb, 0x5c, 0xe4, 0xe2, 0xde, 0xb6, 0xbb, 0x03,
    89  	0xbc, 0x33, 0x63, 0xd2, 0x04, 0x3c, 0xd7, 0xcc, 0xd8, 0x4f, 0x15, 0x53, 0x90, 0x79, 0xa8, 0x87,
    90  	0xfa, 0xad, 0x61, 0xf7, 0xeb, 0xfd, 0xb0, 0x63, 0xe4, 0x54, 0xd0, 0xcb, 0x6a, 0x3c, 0xea, 0xda,
    91  	0x74, 0xfd, 0xba, 0xb1, 0x59, 0xf7, 0x00, 0xe3, 0x27, 0x5b, 0x18, 0x24, 0x52, 0x71, 0xef, 0x5f,
    92  	0x0f, 0xf5, 0xdb, 0xa3, 0x76, 0xe9, 0x5c, 0x4b, 0xc5, 0xdd, 0x53, 0xdc, 0xe5, 0x82, 0xf1, 0x89,
    93  	0x54, 0x22, 0x10, 0xcf, 0x91, 0x10, 0x5c, 0x70, 0xaf, 0xd5, 0x43, 0xfd, 0xcd, 0xd1, 0x76, 0x3d,
    94  	0xb8, 0xaa, 0x7c, 0xf7, 0x18, 0x77, 0x66, 0xa0, 0x93, 0x20, 0xd5, 0x12, 0xb4, 0x34, 0x2f, 0xde,
    95  	0xff, 0xb2, 0x6e, 0xcb, 0x9a, 0xb7, 0x95, 0x37, 0x64, 0xf3, 0x4f, 0xe2, 0xcc, 0x0b, 0x82, 0x16,
    96  	0x05, 0x41, 0xcb, 0x82, 0xa0, 0x8f, 0x82, 0xa0, 0xd7, 0x15, 0x71, 0x16, 0x2b, 0xe2, 0x2c, 0x57,
    97  	0xc4, 0x79, 0xbc, 0x88, 0xa5, 0x19, 0xe7, 0x21, 0x8d, 0x60, 0xea, 0xaf, 0x17, 0xc7, 0xc3, 0x46,
    98  	0xfb, 0x69, 0x12, 0xfb, 0x7f, 0x1f, 0x21, 0xdc, 0x28, 0x37, 0x77, 0xfe, 0x1d, 0x00, 0x00, 0xff,
    99  	0xff, 0x8f, 0x5e, 0x5b, 0x8e, 0xa9, 0x01, 0x00, 0x00,
   100  }
   101  
   102  func (m *AdmissionWorkQueueStats) Marshal() (dAtA []byte, err error) {
   103  	size := m.Size()
   104  	dAtA = make([]byte, size)
   105  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   106  	if err != nil {
   107  		return nil, err
   108  	}
   109  	return dAtA[:n], nil
   110  }
   111  
   112  func (m *AdmissionWorkQueueStats) MarshalTo(dAtA []byte) (int, error) {
   113  	size := m.Size()
   114  	return m.MarshalToSizedBuffer(dAtA[:size])
   115  }
   116  
   117  func (m *AdmissionWorkQueueStats) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   118  	i := len(dAtA)
   119  	_ = i
   120  	var l int
   121  	_ = l
   122  	if len(m.WorkPriority) > 0 {
   123  		i -= len(m.WorkPriority)
   124  		copy(dAtA[i:], m.WorkPriority)
   125  		i = encodeVarintAdmissionStats(dAtA, i, uint64(len(m.WorkPriority)))
   126  		i--
   127  		dAtA[i] = 0x22
   128  	}
   129  	if m.DeadlineExceeded {
   130  		i--
   131  		if m.DeadlineExceeded {
   132  			dAtA[i] = 1
   133  		} else {
   134  			dAtA[i] = 0
   135  		}
   136  		i--
   137  		dAtA[i] = 0x18
   138  	}
   139  	if len(m.QueueKind) > 0 {
   140  		i -= len(m.QueueKind)
   141  		copy(dAtA[i:], m.QueueKind)
   142  		i = encodeVarintAdmissionStats(dAtA, i, uint64(len(m.QueueKind)))
   143  		i--
   144  		dAtA[i] = 0x12
   145  	}
   146  	if m.WaitDurationNanos != 0 {
   147  		i = encodeVarintAdmissionStats(dAtA, i, uint64(m.WaitDurationNanos))
   148  		i--
   149  		dAtA[i] = 0x8
   150  	}
   151  	return len(dAtA) - i, nil
   152  }
   153  
   154  func encodeVarintAdmissionStats(dAtA []byte, offset int, v uint64) int {
   155  	offset -= sovAdmissionStats(v)
   156  	base := offset
   157  	for v >= 1<<7 {
   158  		dAtA[offset] = uint8(v&0x7f | 0x80)
   159  		v >>= 7
   160  		offset++
   161  	}
   162  	dAtA[offset] = uint8(v)
   163  	return base
   164  }
   165  func (m *AdmissionWorkQueueStats) Size() (n int) {
   166  	if m == nil {
   167  		return 0
   168  	}
   169  	var l int
   170  	_ = l
   171  	if m.WaitDurationNanos != 0 {
   172  		n += 1 + sovAdmissionStats(uint64(m.WaitDurationNanos))
   173  	}
   174  	l = len(m.QueueKind)
   175  	if l > 0 {
   176  		n += 1 + l + sovAdmissionStats(uint64(l))
   177  	}
   178  	if m.DeadlineExceeded {
   179  		n += 2
   180  	}
   181  	l = len(m.WorkPriority)
   182  	if l > 0 {
   183  		n += 1 + l + sovAdmissionStats(uint64(l))
   184  	}
   185  	return n
   186  }
   187  
   188  func sovAdmissionStats(x uint64) (n int) {
   189  	return (math_bits.Len64(x|1) + 6) / 7
   190  }
   191  func sozAdmissionStats(x uint64) (n int) {
   192  	return sovAdmissionStats(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   193  }
   194  func (m *AdmissionWorkQueueStats) Unmarshal(dAtA []byte) error {
   195  	l := len(dAtA)
   196  	iNdEx := 0
   197  	for iNdEx < l {
   198  		preIndex := iNdEx
   199  		var wire uint64
   200  		for shift := uint(0); ; shift += 7 {
   201  			if shift >= 64 {
   202  				return ErrIntOverflowAdmissionStats
   203  			}
   204  			if iNdEx >= l {
   205  				return io.ErrUnexpectedEOF
   206  			}
   207  			b := dAtA[iNdEx]
   208  			iNdEx++
   209  			wire |= uint64(b&0x7F) << shift
   210  			if b < 0x80 {
   211  				break
   212  			}
   213  		}
   214  		fieldNum := int32(wire >> 3)
   215  		wireType := int(wire & 0x7)
   216  		if wireType == 4 {
   217  			return fmt.Errorf("proto: AdmissionWorkQueueStats: wiretype end group for non-group")
   218  		}
   219  		if fieldNum <= 0 {
   220  			return fmt.Errorf("proto: AdmissionWorkQueueStats: illegal tag %d (wire type %d)", fieldNum, wire)
   221  		}
   222  		switch fieldNum {
   223  		case 1:
   224  			if wireType != 0 {
   225  				return fmt.Errorf("proto: wrong wireType = %d for field WaitDurationNanos", wireType)
   226  			}
   227  			m.WaitDurationNanos = 0
   228  			for shift := uint(0); ; shift += 7 {
   229  				if shift >= 64 {
   230  					return ErrIntOverflowAdmissionStats
   231  				}
   232  				if iNdEx >= l {
   233  					return io.ErrUnexpectedEOF
   234  				}
   235  				b := dAtA[iNdEx]
   236  				iNdEx++
   237  				m.WaitDurationNanos |= time.Duration(b&0x7F) << shift
   238  				if b < 0x80 {
   239  					break
   240  				}
   241  			}
   242  		case 2:
   243  			if wireType != 2 {
   244  				return fmt.Errorf("proto: wrong wireType = %d for field QueueKind", wireType)
   245  			}
   246  			var stringLen uint64
   247  			for shift := uint(0); ; shift += 7 {
   248  				if shift >= 64 {
   249  					return ErrIntOverflowAdmissionStats
   250  				}
   251  				if iNdEx >= l {
   252  					return io.ErrUnexpectedEOF
   253  				}
   254  				b := dAtA[iNdEx]
   255  				iNdEx++
   256  				stringLen |= uint64(b&0x7F) << shift
   257  				if b < 0x80 {
   258  					break
   259  				}
   260  			}
   261  			intStringLen := int(stringLen)
   262  			if intStringLen < 0 {
   263  				return ErrInvalidLengthAdmissionStats
   264  			}
   265  			postIndex := iNdEx + intStringLen
   266  			if postIndex < 0 {
   267  				return ErrInvalidLengthAdmissionStats
   268  			}
   269  			if postIndex > l {
   270  				return io.ErrUnexpectedEOF
   271  			}
   272  			m.QueueKind = string(dAtA[iNdEx:postIndex])
   273  			iNdEx = postIndex
   274  		case 3:
   275  			if wireType != 0 {
   276  				return fmt.Errorf("proto: wrong wireType = %d for field DeadlineExceeded", wireType)
   277  			}
   278  			var v int
   279  			for shift := uint(0); ; shift += 7 {
   280  				if shift >= 64 {
   281  					return ErrIntOverflowAdmissionStats
   282  				}
   283  				if iNdEx >= l {
   284  					return io.ErrUnexpectedEOF
   285  				}
   286  				b := dAtA[iNdEx]
   287  				iNdEx++
   288  				v |= int(b&0x7F) << shift
   289  				if b < 0x80 {
   290  					break
   291  				}
   292  			}
   293  			m.DeadlineExceeded = bool(v != 0)
   294  		case 4:
   295  			if wireType != 2 {
   296  				return fmt.Errorf("proto: wrong wireType = %d for field WorkPriority", wireType)
   297  			}
   298  			var stringLen uint64
   299  			for shift := uint(0); ; shift += 7 {
   300  				if shift >= 64 {
   301  					return ErrIntOverflowAdmissionStats
   302  				}
   303  				if iNdEx >= l {
   304  					return io.ErrUnexpectedEOF
   305  				}
   306  				b := dAtA[iNdEx]
   307  				iNdEx++
   308  				stringLen |= uint64(b&0x7F) << shift
   309  				if b < 0x80 {
   310  					break
   311  				}
   312  			}
   313  			intStringLen := int(stringLen)
   314  			if intStringLen < 0 {
   315  				return ErrInvalidLengthAdmissionStats
   316  			}
   317  			postIndex := iNdEx + intStringLen
   318  			if postIndex < 0 {
   319  				return ErrInvalidLengthAdmissionStats
   320  			}
   321  			if postIndex > l {
   322  				return io.ErrUnexpectedEOF
   323  			}
   324  			m.WorkPriority = string(dAtA[iNdEx:postIndex])
   325  			iNdEx = postIndex
   326  		default:
   327  			iNdEx = preIndex
   328  			skippy, err := skipAdmissionStats(dAtA[iNdEx:])
   329  			if err != nil {
   330  				return err
   331  			}
   332  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   333  				return ErrInvalidLengthAdmissionStats
   334  			}
   335  			if (iNdEx + skippy) > l {
   336  				return io.ErrUnexpectedEOF
   337  			}
   338  			iNdEx += skippy
   339  		}
   340  	}
   341  
   342  	if iNdEx > l {
   343  		return io.ErrUnexpectedEOF
   344  	}
   345  	return nil
   346  }
   347  func skipAdmissionStats(dAtA []byte) (n int, err error) {
   348  	l := len(dAtA)
   349  	iNdEx := 0
   350  	depth := 0
   351  	for iNdEx < l {
   352  		var wire uint64
   353  		for shift := uint(0); ; shift += 7 {
   354  			if shift >= 64 {
   355  				return 0, ErrIntOverflowAdmissionStats
   356  			}
   357  			if iNdEx >= l {
   358  				return 0, io.ErrUnexpectedEOF
   359  			}
   360  			b := dAtA[iNdEx]
   361  			iNdEx++
   362  			wire |= (uint64(b) & 0x7F) << shift
   363  			if b < 0x80 {
   364  				break
   365  			}
   366  		}
   367  		wireType := int(wire & 0x7)
   368  		switch wireType {
   369  		case 0:
   370  			for shift := uint(0); ; shift += 7 {
   371  				if shift >= 64 {
   372  					return 0, ErrIntOverflowAdmissionStats
   373  				}
   374  				if iNdEx >= l {
   375  					return 0, io.ErrUnexpectedEOF
   376  				}
   377  				iNdEx++
   378  				if dAtA[iNdEx-1] < 0x80 {
   379  					break
   380  				}
   381  			}
   382  		case 1:
   383  			iNdEx += 8
   384  		case 2:
   385  			var length int
   386  			for shift := uint(0); ; shift += 7 {
   387  				if shift >= 64 {
   388  					return 0, ErrIntOverflowAdmissionStats
   389  				}
   390  				if iNdEx >= l {
   391  					return 0, io.ErrUnexpectedEOF
   392  				}
   393  				b := dAtA[iNdEx]
   394  				iNdEx++
   395  				length |= (int(b) & 0x7F) << shift
   396  				if b < 0x80 {
   397  					break
   398  				}
   399  			}
   400  			if length < 0 {
   401  				return 0, ErrInvalidLengthAdmissionStats
   402  			}
   403  			iNdEx += length
   404  		case 3:
   405  			depth++
   406  		case 4:
   407  			if depth == 0 {
   408  				return 0, ErrUnexpectedEndOfGroupAdmissionStats
   409  			}
   410  			depth--
   411  		case 5:
   412  			iNdEx += 4
   413  		default:
   414  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   415  		}
   416  		if iNdEx < 0 {
   417  			return 0, ErrInvalidLengthAdmissionStats
   418  		}
   419  		if depth == 0 {
   420  			return iNdEx, nil
   421  		}
   422  	}
   423  	return 0, io.ErrUnexpectedEOF
   424  }
   425  
   426  var (
   427  	ErrInvalidLengthAdmissionStats        = fmt.Errorf("proto: negative length found during unmarshaling")
   428  	ErrIntOverflowAdmissionStats          = fmt.Errorf("proto: integer overflow")
   429  	ErrUnexpectedEndOfGroupAdmissionStats = fmt.Errorf("proto: unexpected end of group")
   430  )
   431