github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/pkg/querier/stats/stats.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: pkg/querier/stats/stats.proto 3 4 package stats 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 11 _ "github.com/golang/protobuf/ptypes/duration" 12 io "io" 13 math "math" 14 math_bits "math/bits" 15 reflect "reflect" 16 strings "strings" 17 time "time" 18 ) 19 20 // Reference imports to suppress errors if they are not otherwise used. 21 var _ = proto.Marshal 22 var _ = fmt.Errorf 23 var _ = math.Inf 24 var _ = time.Kitchen 25 26 // This is a compile-time assertion to ensure that this generated file 27 // is compatible with the proto package it is being compiled against. 28 // A compilation error at this line likely means your copy of the 29 // proto package needs to be updated. 30 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 31 32 type Stats struct { 33 // The sum of all wall time spent in the querier to execute the query. 34 WallTime time.Duration `protobuf:"bytes,1,opt,name=wall_time,json=wallTime,proto3,stdduration" json:"wall_time"` 35 // The number of series fetched for the query 36 FetchedSeriesCount uint64 `protobuf:"varint,2,opt,name=fetched_series_count,json=fetchedSeriesCount,proto3" json:"fetched_series_count,omitempty"` 37 // The number of bytes of the chunks fetched for the query 38 FetchedChunkBytes uint64 `protobuf:"varint,3,opt,name=fetched_chunk_bytes,json=fetchedChunkBytes,proto3" json:"fetched_chunk_bytes,omitempty"` 39 } 40 41 func (m *Stats) Reset() { *m = Stats{} } 42 func (*Stats) ProtoMessage() {} 43 func (*Stats) Descriptor() ([]byte, []int) { 44 return fileDescriptor_8ca2404f80bab2e8, []int{0} 45 } 46 func (m *Stats) XXX_Unmarshal(b []byte) error { 47 return m.Unmarshal(b) 48 } 49 func (m *Stats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 50 if deterministic { 51 return xxx_messageInfo_Stats.Marshal(b, m, deterministic) 52 } else { 53 b = b[:cap(b)] 54 n, err := m.MarshalToSizedBuffer(b) 55 if err != nil { 56 return nil, err 57 } 58 return b[:n], nil 59 } 60 } 61 func (m *Stats) XXX_Merge(src proto.Message) { 62 xxx_messageInfo_Stats.Merge(m, src) 63 } 64 func (m *Stats) XXX_Size() int { 65 return m.Size() 66 } 67 func (m *Stats) XXX_DiscardUnknown() { 68 xxx_messageInfo_Stats.DiscardUnknown(m) 69 } 70 71 var xxx_messageInfo_Stats proto.InternalMessageInfo 72 73 func (m *Stats) GetWallTime() time.Duration { 74 if m != nil { 75 return m.WallTime 76 } 77 return 0 78 } 79 80 func (m *Stats) GetFetchedSeriesCount() uint64 { 81 if m != nil { 82 return m.FetchedSeriesCount 83 } 84 return 0 85 } 86 87 func (m *Stats) GetFetchedChunkBytes() uint64 { 88 if m != nil { 89 return m.FetchedChunkBytes 90 } 91 return 0 92 } 93 94 func init() { 95 proto.RegisterType((*Stats)(nil), "stats.Stats") 96 } 97 98 func init() { proto.RegisterFile("pkg/querier/stats/stats.proto", fileDescriptor_8ca2404f80bab2e8) } 99 100 var fileDescriptor_8ca2404f80bab2e8 = []byte{ 101 // 308 bytes of a gzipped FileDescriptorProto 102 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0x31, 0x4e, 0xf3, 0x30, 103 0x18, 0x86, 0xfd, 0xfd, 0x3f, 0x45, 0x25, 0x4c, 0x04, 0x86, 0x52, 0x89, 0xaf, 0x15, 0x53, 0x19, 104 0x48, 0x10, 0x5c, 0x00, 0xb5, 0x9c, 0xa0, 0x65, 0x62, 0x89, 0x9c, 0xd4, 0x75, 0xad, 0xa6, 0x71, 105 0x49, 0x6c, 0x21, 0x36, 0x8e, 0xc0, 0xc8, 0x11, 0x90, 0xb8, 0x48, 0xc7, 0x8e, 0x9d, 0x80, 0xba, 106 0x0b, 0x63, 0x8f, 0x80, 0xec, 0xa4, 0x02, 0x89, 0xc5, 0xf2, 0xab, 0xc7, 0x8f, 0xa5, 0xf7, 0xf5, 107 0x4e, 0x66, 0x13, 0x1e, 0xde, 0x6b, 0x96, 0x0b, 0x96, 0x87, 0x85, 0xa2, 0xaa, 0x28, 0xcf, 0x60, 108 0x96, 0x4b, 0x25, 0xfd, 0x9a, 0x0b, 0xcd, 0x73, 0x2e, 0xd4, 0x58, 0xc7, 0x41, 0x22, 0xa7, 0x21, 109 0x97, 0x5c, 0x86, 0x8e, 0xc6, 0x7a, 0xe4, 0x92, 0x0b, 0xee, 0x56, 0x5a, 0x4d, 0xe4, 0x52, 0xf2, 110 0x94, 0xfd, 0xbc, 0x1a, 0xea, 0x9c, 0x2a, 0x21, 0xb3, 0x92, 0x9f, 0xbe, 0x81, 0x57, 0x1b, 0xd8, 111 0x8f, 0xfd, 0x6b, 0x6f, 0xef, 0x81, 0xa6, 0x69, 0xa4, 0xc4, 0x94, 0x35, 0xa0, 0x0d, 0x9d, 0xfd, 112 0xcb, 0xe3, 0xa0, 0xb4, 0x83, 0xad, 0x1d, 0xdc, 0x54, 0x76, 0xb7, 0x3e, 0x7f, 0x6f, 0x91, 0x97, 113 0x8f, 0x16, 0xf4, 0xeb, 0xd6, 0xba, 0x15, 0x53, 0xe6, 0x5f, 0x78, 0x47, 0x23, 0xa6, 0x92, 0x31, 114 0x1b, 0x46, 0x85, 0x6d, 0x51, 0x44, 0x89, 0xd4, 0x99, 0x6a, 0xfc, 0x6b, 0x43, 0x67, 0xa7, 0xef, 115 0x57, 0x6c, 0xe0, 0x50, 0xcf, 0x12, 0x3f, 0xf0, 0x0e, 0xb7, 0x46, 0x32, 0xd6, 0xd9, 0x24, 0x8a, 116 0x1f, 0x15, 0x2b, 0x1a, 0xff, 0x9d, 0x70, 0x50, 0xa1, 0x9e, 0x25, 0x5d, 0x0b, 0xba, 0xd1, 0x62, 117 0x85, 0x64, 0xb9, 0x42, 0xb2, 0x59, 0x21, 0x3c, 0x19, 0x84, 0x57, 0x83, 0x30, 0x37, 0x08, 0x0b, 118 0x83, 0xf0, 0x69, 0x10, 0xbe, 0x0c, 0x92, 0x8d, 0x41, 0x78, 0x5e, 0x23, 0x59, 0xac, 0x91, 0x2c, 119 0xd7, 0x48, 0xee, 0xce, 0x7e, 0x4f, 0x96, 0xd3, 0x11, 0xcd, 0x68, 0x98, 0xca, 0x89, 0x08, 0xff, 120 0x0c, 0x1e, 0xef, 0xba, 0xa6, 0x57, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xcb, 0x18, 0x2b, 121 0x8c, 0x01, 0x00, 0x00, 122 } 123 124 func (this *Stats) Equal(that interface{}) bool { 125 if that == nil { 126 return this == nil 127 } 128 129 that1, ok := that.(*Stats) 130 if !ok { 131 that2, ok := that.(Stats) 132 if ok { 133 that1 = &that2 134 } else { 135 return false 136 } 137 } 138 if that1 == nil { 139 return this == nil 140 } else if this == nil { 141 return false 142 } 143 if this.WallTime != that1.WallTime { 144 return false 145 } 146 if this.FetchedSeriesCount != that1.FetchedSeriesCount { 147 return false 148 } 149 if this.FetchedChunkBytes != that1.FetchedChunkBytes { 150 return false 151 } 152 return true 153 } 154 func (this *Stats) GoString() string { 155 if this == nil { 156 return "nil" 157 } 158 s := make([]string, 0, 7) 159 s = append(s, "&stats.Stats{") 160 s = append(s, "WallTime: "+fmt.Sprintf("%#v", this.WallTime)+",\n") 161 s = append(s, "FetchedSeriesCount: "+fmt.Sprintf("%#v", this.FetchedSeriesCount)+",\n") 162 s = append(s, "FetchedChunkBytes: "+fmt.Sprintf("%#v", this.FetchedChunkBytes)+",\n") 163 s = append(s, "}") 164 return strings.Join(s, "") 165 } 166 func valueToGoStringStats(v interface{}, typ string) string { 167 rv := reflect.ValueOf(v) 168 if rv.IsNil() { 169 return "nil" 170 } 171 pv := reflect.Indirect(rv).Interface() 172 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) 173 } 174 func (m *Stats) Marshal() (dAtA []byte, err error) { 175 size := m.Size() 176 dAtA = make([]byte, size) 177 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 178 if err != nil { 179 return nil, err 180 } 181 return dAtA[:n], nil 182 } 183 184 func (m *Stats) MarshalTo(dAtA []byte) (int, error) { 185 size := m.Size() 186 return m.MarshalToSizedBuffer(dAtA[:size]) 187 } 188 189 func (m *Stats) MarshalToSizedBuffer(dAtA []byte) (int, error) { 190 i := len(dAtA) 191 _ = i 192 var l int 193 _ = l 194 if m.FetchedChunkBytes != 0 { 195 i = encodeVarintStats(dAtA, i, uint64(m.FetchedChunkBytes)) 196 i-- 197 dAtA[i] = 0x18 198 } 199 if m.FetchedSeriesCount != 0 { 200 i = encodeVarintStats(dAtA, i, uint64(m.FetchedSeriesCount)) 201 i-- 202 dAtA[i] = 0x10 203 } 204 n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.WallTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.WallTime):]) 205 if err1 != nil { 206 return 0, err1 207 } 208 i -= n1 209 i = encodeVarintStats(dAtA, i, uint64(n1)) 210 i-- 211 dAtA[i] = 0xa 212 return len(dAtA) - i, nil 213 } 214 215 func encodeVarintStats(dAtA []byte, offset int, v uint64) int { 216 offset -= sovStats(v) 217 base := offset 218 for v >= 1<<7 { 219 dAtA[offset] = uint8(v&0x7f | 0x80) 220 v >>= 7 221 offset++ 222 } 223 dAtA[offset] = uint8(v) 224 return base 225 } 226 func (m *Stats) Size() (n int) { 227 if m == nil { 228 return 0 229 } 230 var l int 231 _ = l 232 l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.WallTime) 233 n += 1 + l + sovStats(uint64(l)) 234 if m.FetchedSeriesCount != 0 { 235 n += 1 + sovStats(uint64(m.FetchedSeriesCount)) 236 } 237 if m.FetchedChunkBytes != 0 { 238 n += 1 + sovStats(uint64(m.FetchedChunkBytes)) 239 } 240 return n 241 } 242 243 func sovStats(x uint64) (n int) { 244 return (math_bits.Len64(x|1) + 6) / 7 245 } 246 func sozStats(x uint64) (n int) { 247 return sovStats(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 248 } 249 func (this *Stats) String() string { 250 if this == nil { 251 return "nil" 252 } 253 s := strings.Join([]string{`&Stats{`, 254 `WallTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.WallTime), "Duration", "duration.Duration", 1), `&`, ``, 1) + `,`, 255 `FetchedSeriesCount:` + fmt.Sprintf("%v", this.FetchedSeriesCount) + `,`, 256 `FetchedChunkBytes:` + fmt.Sprintf("%v", this.FetchedChunkBytes) + `,`, 257 `}`, 258 }, "") 259 return s 260 } 261 func valueToStringStats(v interface{}) string { 262 rv := reflect.ValueOf(v) 263 if rv.IsNil() { 264 return "nil" 265 } 266 pv := reflect.Indirect(rv).Interface() 267 return fmt.Sprintf("*%v", pv) 268 } 269 func (m *Stats) Unmarshal(dAtA []byte) error { 270 l := len(dAtA) 271 iNdEx := 0 272 for iNdEx < l { 273 preIndex := iNdEx 274 var wire uint64 275 for shift := uint(0); ; shift += 7 { 276 if shift >= 64 { 277 return ErrIntOverflowStats 278 } 279 if iNdEx >= l { 280 return io.ErrUnexpectedEOF 281 } 282 b := dAtA[iNdEx] 283 iNdEx++ 284 wire |= uint64(b&0x7F) << shift 285 if b < 0x80 { 286 break 287 } 288 } 289 fieldNum := int32(wire >> 3) 290 wireType := int(wire & 0x7) 291 if wireType == 4 { 292 return fmt.Errorf("proto: Stats: wiretype end group for non-group") 293 } 294 if fieldNum <= 0 { 295 return fmt.Errorf("proto: Stats: illegal tag %d (wire type %d)", fieldNum, wire) 296 } 297 switch fieldNum { 298 case 1: 299 if wireType != 2 { 300 return fmt.Errorf("proto: wrong wireType = %d for field WallTime", wireType) 301 } 302 var msglen int 303 for shift := uint(0); ; shift += 7 { 304 if shift >= 64 { 305 return ErrIntOverflowStats 306 } 307 if iNdEx >= l { 308 return io.ErrUnexpectedEOF 309 } 310 b := dAtA[iNdEx] 311 iNdEx++ 312 msglen |= int(b&0x7F) << shift 313 if b < 0x80 { 314 break 315 } 316 } 317 if msglen < 0 { 318 return ErrInvalidLengthStats 319 } 320 postIndex := iNdEx + msglen 321 if postIndex < 0 { 322 return ErrInvalidLengthStats 323 } 324 if postIndex > l { 325 return io.ErrUnexpectedEOF 326 } 327 if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.WallTime, dAtA[iNdEx:postIndex]); err != nil { 328 return err 329 } 330 iNdEx = postIndex 331 case 2: 332 if wireType != 0 { 333 return fmt.Errorf("proto: wrong wireType = %d for field FetchedSeriesCount", wireType) 334 } 335 m.FetchedSeriesCount = 0 336 for shift := uint(0); ; shift += 7 { 337 if shift >= 64 { 338 return ErrIntOverflowStats 339 } 340 if iNdEx >= l { 341 return io.ErrUnexpectedEOF 342 } 343 b := dAtA[iNdEx] 344 iNdEx++ 345 m.FetchedSeriesCount |= uint64(b&0x7F) << shift 346 if b < 0x80 { 347 break 348 } 349 } 350 case 3: 351 if wireType != 0 { 352 return fmt.Errorf("proto: wrong wireType = %d for field FetchedChunkBytes", wireType) 353 } 354 m.FetchedChunkBytes = 0 355 for shift := uint(0); ; shift += 7 { 356 if shift >= 64 { 357 return ErrIntOverflowStats 358 } 359 if iNdEx >= l { 360 return io.ErrUnexpectedEOF 361 } 362 b := dAtA[iNdEx] 363 iNdEx++ 364 m.FetchedChunkBytes |= uint64(b&0x7F) << shift 365 if b < 0x80 { 366 break 367 } 368 } 369 default: 370 iNdEx = preIndex 371 skippy, err := skipStats(dAtA[iNdEx:]) 372 if err != nil { 373 return err 374 } 375 if skippy < 0 { 376 return ErrInvalidLengthStats 377 } 378 if (iNdEx + skippy) < 0 { 379 return ErrInvalidLengthStats 380 } 381 if (iNdEx + skippy) > l { 382 return io.ErrUnexpectedEOF 383 } 384 iNdEx += skippy 385 } 386 } 387 388 if iNdEx > l { 389 return io.ErrUnexpectedEOF 390 } 391 return nil 392 } 393 func skipStats(dAtA []byte) (n int, err error) { 394 l := len(dAtA) 395 iNdEx := 0 396 for iNdEx < l { 397 var wire uint64 398 for shift := uint(0); ; shift += 7 { 399 if shift >= 64 { 400 return 0, ErrIntOverflowStats 401 } 402 if iNdEx >= l { 403 return 0, io.ErrUnexpectedEOF 404 } 405 b := dAtA[iNdEx] 406 iNdEx++ 407 wire |= (uint64(b) & 0x7F) << shift 408 if b < 0x80 { 409 break 410 } 411 } 412 wireType := int(wire & 0x7) 413 switch wireType { 414 case 0: 415 for shift := uint(0); ; shift += 7 { 416 if shift >= 64 { 417 return 0, ErrIntOverflowStats 418 } 419 if iNdEx >= l { 420 return 0, io.ErrUnexpectedEOF 421 } 422 iNdEx++ 423 if dAtA[iNdEx-1] < 0x80 { 424 break 425 } 426 } 427 return iNdEx, nil 428 case 1: 429 iNdEx += 8 430 return iNdEx, nil 431 case 2: 432 var length int 433 for shift := uint(0); ; shift += 7 { 434 if shift >= 64 { 435 return 0, ErrIntOverflowStats 436 } 437 if iNdEx >= l { 438 return 0, io.ErrUnexpectedEOF 439 } 440 b := dAtA[iNdEx] 441 iNdEx++ 442 length |= (int(b) & 0x7F) << shift 443 if b < 0x80 { 444 break 445 } 446 } 447 if length < 0 { 448 return 0, ErrInvalidLengthStats 449 } 450 iNdEx += length 451 if iNdEx < 0 { 452 return 0, ErrInvalidLengthStats 453 } 454 return iNdEx, nil 455 case 3: 456 for { 457 var innerWire uint64 458 var start int = iNdEx 459 for shift := uint(0); ; shift += 7 { 460 if shift >= 64 { 461 return 0, ErrIntOverflowStats 462 } 463 if iNdEx >= l { 464 return 0, io.ErrUnexpectedEOF 465 } 466 b := dAtA[iNdEx] 467 iNdEx++ 468 innerWire |= (uint64(b) & 0x7F) << shift 469 if b < 0x80 { 470 break 471 } 472 } 473 innerWireType := int(innerWire & 0x7) 474 if innerWireType == 4 { 475 break 476 } 477 next, err := skipStats(dAtA[start:]) 478 if err != nil { 479 return 0, err 480 } 481 iNdEx = start + next 482 if iNdEx < 0 { 483 return 0, ErrInvalidLengthStats 484 } 485 } 486 return iNdEx, nil 487 case 4: 488 return iNdEx, nil 489 case 5: 490 iNdEx += 4 491 return iNdEx, nil 492 default: 493 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 494 } 495 } 496 panic("unreachable") 497 } 498 499 var ( 500 ErrInvalidLengthStats = fmt.Errorf("proto: negative length found during unmarshaling") 501 ErrIntOverflowStats = fmt.Errorf("proto: integer overflow") 502 )