github.com/thanos-io/thanos@v0.32.5/internal/cortex/querier/stats/stats.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: 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_b4756a0aec8b9d44, []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("stats.proto", fileDescriptor_b4756a0aec8b9d44) } 99 100 var fileDescriptor_b4756a0aec8b9d44 = []byte{ 101 // 281 bytes of a gzipped FileDescriptorProto 102 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xd0, 0xb1, 0x4e, 0x83, 0x40, 103 0x1c, 0xc7, 0xf1, 0xfb, 0xab, 0x35, 0x95, 0x4e, 0xa2, 0x03, 0x76, 0xf8, 0xb7, 0x71, 0xea, 0xe2, 104 0xd5, 0xe8, 0xe8, 0x62, 0xa8, 0x4f, 0xd0, 0x3a, 0xb9, 0x10, 0xa0, 0x57, 0x20, 0x02, 0x67, 0xe0, 105 0x2e, 0xc6, 0xcd, 0x47, 0x70, 0xf4, 0x11, 0x4c, 0x7c, 0x91, 0x8e, 0x8c, 0x9d, 0x54, 0x8e, 0xc5, 106 0xb1, 0x8f, 0x60, 0xee, 0xa0, 0x71, 0xe3, 0x97, 0x0f, 0xdf, 0x4b, 0xee, 0xac, 0x41, 0x29, 0x7c, 107 0x51, 0xd2, 0xa7, 0x82, 0x0b, 0x6e, 0xf7, 0xcc, 0x18, 0x5e, 0x44, 0x89, 0x88, 0x65, 0x40, 0x43, 108 0x9e, 0x4d, 0x23, 0x1e, 0xf1, 0xa9, 0xd1, 0x40, 0xae, 0xcc, 0x32, 0xc3, 0x7c, 0xb5, 0xd5, 0x10, 109 0x23, 0xce, 0xa3, 0x94, 0xfd, 0xff, 0xb5, 0x94, 0x85, 0x2f, 0x12, 0x9e, 0xb7, 0x7e, 0xfe, 0x09, 110 0x56, 0x6f, 0xa1, 0x0f, 0xb6, 0x6f, 0xad, 0xa3, 0x67, 0x3f, 0x4d, 0x3d, 0x91, 0x64, 0xcc, 0x81, 111 0x31, 0x4c, 0x06, 0x57, 0x67, 0xb4, 0xad, 0xe9, 0xae, 0xa6, 0x77, 0x5d, 0xed, 0xf6, 0xd7, 0x5f, 112 0x23, 0xf2, 0xfe, 0x3d, 0x82, 0x79, 0x5f, 0x57, 0xf7, 0x49, 0xc6, 0xec, 0x4b, 0xeb, 0x74, 0xc5, 113 0x44, 0x18, 0xb3, 0xa5, 0x57, 0xb2, 0x22, 0x61, 0xa5, 0x17, 0x72, 0x99, 0x0b, 0x67, 0x6f, 0x0c, 114 0x93, 0x83, 0xb9, 0xdd, 0xd9, 0xc2, 0xd0, 0x4c, 0x8b, 0x4d, 0xad, 0x93, 0x5d, 0x11, 0xc6, 0x32, 115 0x7f, 0xf4, 0x82, 0x17, 0xc1, 0x4a, 0x67, 0xdf, 0x04, 0xc7, 0x1d, 0xcd, 0xb4, 0xb8, 0x1a, 0xdc, 116 0x9b, 0xaa, 0x46, 0xb2, 0xa9, 0x91, 0x6c, 0x6b, 0x84, 0x57, 0x85, 0xf0, 0xa1, 0x10, 0xd6, 0x0a, 117 0xa1, 0x52, 0x08, 0x3f, 0x0a, 0xe1, 0x57, 0x21, 0xd9, 0x2a, 0x84, 0xb7, 0x06, 0x49, 0xd5, 0x20, 118 0xd9, 0x34, 0x48, 0x1e, 0xda, 0x97, 0x0b, 0x0e, 0xcd, 0x2d, 0xae, 0xff, 0x02, 0x00, 0x00, 0xff, 119 0xff, 0x9d, 0xf1, 0x86, 0xb8, 0x56, 0x01, 0x00, 0x00, 120 } 121 122 func (this *Stats) Equal(that interface{}) bool { 123 if that == nil { 124 return this == nil 125 } 126 127 that1, ok := that.(*Stats) 128 if !ok { 129 that2, ok := that.(Stats) 130 if ok { 131 that1 = &that2 132 } else { 133 return false 134 } 135 } 136 if that1 == nil { 137 return this == nil 138 } else if this == nil { 139 return false 140 } 141 if this.WallTime != that1.WallTime { 142 return false 143 } 144 if this.FetchedSeriesCount != that1.FetchedSeriesCount { 145 return false 146 } 147 if this.FetchedChunkBytes != that1.FetchedChunkBytes { 148 return false 149 } 150 return true 151 } 152 func (this *Stats) GoString() string { 153 if this == nil { 154 return "nil" 155 } 156 s := make([]string, 0, 7) 157 s = append(s, "&stats.Stats{") 158 s = append(s, "WallTime: "+fmt.Sprintf("%#v", this.WallTime)+",\n") 159 s = append(s, "FetchedSeriesCount: "+fmt.Sprintf("%#v", this.FetchedSeriesCount)+",\n") 160 s = append(s, "FetchedChunkBytes: "+fmt.Sprintf("%#v", this.FetchedChunkBytes)+",\n") 161 s = append(s, "}") 162 return strings.Join(s, "") 163 } 164 func valueToGoStringStats(v interface{}, typ string) string { 165 rv := reflect.ValueOf(v) 166 if rv.IsNil() { 167 return "nil" 168 } 169 pv := reflect.Indirect(rv).Interface() 170 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) 171 } 172 func (m *Stats) Marshal() (dAtA []byte, err error) { 173 size := m.Size() 174 dAtA = make([]byte, size) 175 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 176 if err != nil { 177 return nil, err 178 } 179 return dAtA[:n], nil 180 } 181 182 func (m *Stats) MarshalTo(dAtA []byte) (int, error) { 183 size := m.Size() 184 return m.MarshalToSizedBuffer(dAtA[:size]) 185 } 186 187 func (m *Stats) MarshalToSizedBuffer(dAtA []byte) (int, error) { 188 i := len(dAtA) 189 _ = i 190 var l int 191 _ = l 192 if m.FetchedChunkBytes != 0 { 193 i = encodeVarintStats(dAtA, i, uint64(m.FetchedChunkBytes)) 194 i-- 195 dAtA[i] = 0x18 196 } 197 if m.FetchedSeriesCount != 0 { 198 i = encodeVarintStats(dAtA, i, uint64(m.FetchedSeriesCount)) 199 i-- 200 dAtA[i] = 0x10 201 } 202 n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.WallTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.WallTime):]) 203 if err1 != nil { 204 return 0, err1 205 } 206 i -= n1 207 i = encodeVarintStats(dAtA, i, uint64(n1)) 208 i-- 209 dAtA[i] = 0xa 210 return len(dAtA) - i, nil 211 } 212 213 func encodeVarintStats(dAtA []byte, offset int, v uint64) int { 214 offset -= sovStats(v) 215 base := offset 216 for v >= 1<<7 { 217 dAtA[offset] = uint8(v&0x7f | 0x80) 218 v >>= 7 219 offset++ 220 } 221 dAtA[offset] = uint8(v) 222 return base 223 } 224 func (m *Stats) Size() (n int) { 225 if m == nil { 226 return 0 227 } 228 var l int 229 _ = l 230 l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.WallTime) 231 n += 1 + l + sovStats(uint64(l)) 232 if m.FetchedSeriesCount != 0 { 233 n += 1 + sovStats(uint64(m.FetchedSeriesCount)) 234 } 235 if m.FetchedChunkBytes != 0 { 236 n += 1 + sovStats(uint64(m.FetchedChunkBytes)) 237 } 238 return n 239 } 240 241 func sovStats(x uint64) (n int) { 242 return (math_bits.Len64(x|1) + 6) / 7 243 } 244 func sozStats(x uint64) (n int) { 245 return sovStats(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 246 } 247 func (this *Stats) String() string { 248 if this == nil { 249 return "nil" 250 } 251 s := strings.Join([]string{`&Stats{`, 252 `WallTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.WallTime), "Duration", "duration.Duration", 1), `&`, ``, 1) + `,`, 253 `FetchedSeriesCount:` + fmt.Sprintf("%v", this.FetchedSeriesCount) + `,`, 254 `FetchedChunkBytes:` + fmt.Sprintf("%v", this.FetchedChunkBytes) + `,`, 255 `}`, 256 }, "") 257 return s 258 } 259 func valueToStringStats(v interface{}) string { 260 rv := reflect.ValueOf(v) 261 if rv.IsNil() { 262 return "nil" 263 } 264 pv := reflect.Indirect(rv).Interface() 265 return fmt.Sprintf("*%v", pv) 266 } 267 func (m *Stats) Unmarshal(dAtA []byte) error { 268 l := len(dAtA) 269 iNdEx := 0 270 for iNdEx < l { 271 preIndex := iNdEx 272 var wire uint64 273 for shift := uint(0); ; shift += 7 { 274 if shift >= 64 { 275 return ErrIntOverflowStats 276 } 277 if iNdEx >= l { 278 return io.ErrUnexpectedEOF 279 } 280 b := dAtA[iNdEx] 281 iNdEx++ 282 wire |= uint64(b&0x7F) << shift 283 if b < 0x80 { 284 break 285 } 286 } 287 fieldNum := int32(wire >> 3) 288 wireType := int(wire & 0x7) 289 if wireType == 4 { 290 return fmt.Errorf("proto: Stats: wiretype end group for non-group") 291 } 292 if fieldNum <= 0 { 293 return fmt.Errorf("proto: Stats: illegal tag %d (wire type %d)", fieldNum, wire) 294 } 295 switch fieldNum { 296 case 1: 297 if wireType != 2 { 298 return fmt.Errorf("proto: wrong wireType = %d for field WallTime", wireType) 299 } 300 var msglen int 301 for shift := uint(0); ; shift += 7 { 302 if shift >= 64 { 303 return ErrIntOverflowStats 304 } 305 if iNdEx >= l { 306 return io.ErrUnexpectedEOF 307 } 308 b := dAtA[iNdEx] 309 iNdEx++ 310 msglen |= int(b&0x7F) << shift 311 if b < 0x80 { 312 break 313 } 314 } 315 if msglen < 0 { 316 return ErrInvalidLengthStats 317 } 318 postIndex := iNdEx + msglen 319 if postIndex < 0 { 320 return ErrInvalidLengthStats 321 } 322 if postIndex > l { 323 return io.ErrUnexpectedEOF 324 } 325 if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.WallTime, dAtA[iNdEx:postIndex]); err != nil { 326 return err 327 } 328 iNdEx = postIndex 329 case 2: 330 if wireType != 0 { 331 return fmt.Errorf("proto: wrong wireType = %d for field FetchedSeriesCount", wireType) 332 } 333 m.FetchedSeriesCount = 0 334 for shift := uint(0); ; shift += 7 { 335 if shift >= 64 { 336 return ErrIntOverflowStats 337 } 338 if iNdEx >= l { 339 return io.ErrUnexpectedEOF 340 } 341 b := dAtA[iNdEx] 342 iNdEx++ 343 m.FetchedSeriesCount |= uint64(b&0x7F) << shift 344 if b < 0x80 { 345 break 346 } 347 } 348 case 3: 349 if wireType != 0 { 350 return fmt.Errorf("proto: wrong wireType = %d for field FetchedChunkBytes", wireType) 351 } 352 m.FetchedChunkBytes = 0 353 for shift := uint(0); ; shift += 7 { 354 if shift >= 64 { 355 return ErrIntOverflowStats 356 } 357 if iNdEx >= l { 358 return io.ErrUnexpectedEOF 359 } 360 b := dAtA[iNdEx] 361 iNdEx++ 362 m.FetchedChunkBytes |= uint64(b&0x7F) << shift 363 if b < 0x80 { 364 break 365 } 366 } 367 default: 368 iNdEx = preIndex 369 skippy, err := skipStats(dAtA[iNdEx:]) 370 if err != nil { 371 return err 372 } 373 if skippy < 0 { 374 return ErrInvalidLengthStats 375 } 376 if (iNdEx + skippy) < 0 { 377 return ErrInvalidLengthStats 378 } 379 if (iNdEx + skippy) > l { 380 return io.ErrUnexpectedEOF 381 } 382 iNdEx += skippy 383 } 384 } 385 386 if iNdEx > l { 387 return io.ErrUnexpectedEOF 388 } 389 return nil 390 } 391 func skipStats(dAtA []byte) (n int, err error) { 392 l := len(dAtA) 393 iNdEx := 0 394 for iNdEx < l { 395 var wire uint64 396 for shift := uint(0); ; shift += 7 { 397 if shift >= 64 { 398 return 0, ErrIntOverflowStats 399 } 400 if iNdEx >= l { 401 return 0, io.ErrUnexpectedEOF 402 } 403 b := dAtA[iNdEx] 404 iNdEx++ 405 wire |= (uint64(b) & 0x7F) << shift 406 if b < 0x80 { 407 break 408 } 409 } 410 wireType := int(wire & 0x7) 411 switch wireType { 412 case 0: 413 for shift := uint(0); ; shift += 7 { 414 if shift >= 64 { 415 return 0, ErrIntOverflowStats 416 } 417 if iNdEx >= l { 418 return 0, io.ErrUnexpectedEOF 419 } 420 iNdEx++ 421 if dAtA[iNdEx-1] < 0x80 { 422 break 423 } 424 } 425 return iNdEx, nil 426 case 1: 427 iNdEx += 8 428 return iNdEx, nil 429 case 2: 430 var length int 431 for shift := uint(0); ; shift += 7 { 432 if shift >= 64 { 433 return 0, ErrIntOverflowStats 434 } 435 if iNdEx >= l { 436 return 0, io.ErrUnexpectedEOF 437 } 438 b := dAtA[iNdEx] 439 iNdEx++ 440 length |= (int(b) & 0x7F) << shift 441 if b < 0x80 { 442 break 443 } 444 } 445 if length < 0 { 446 return 0, ErrInvalidLengthStats 447 } 448 iNdEx += length 449 if iNdEx < 0 { 450 return 0, ErrInvalidLengthStats 451 } 452 return iNdEx, nil 453 case 3: 454 for { 455 var innerWire uint64 456 var start int = iNdEx 457 for shift := uint(0); ; shift += 7 { 458 if shift >= 64 { 459 return 0, ErrIntOverflowStats 460 } 461 if iNdEx >= l { 462 return 0, io.ErrUnexpectedEOF 463 } 464 b := dAtA[iNdEx] 465 iNdEx++ 466 innerWire |= (uint64(b) & 0x7F) << shift 467 if b < 0x80 { 468 break 469 } 470 } 471 innerWireType := int(innerWire & 0x7) 472 if innerWireType == 4 { 473 break 474 } 475 next, err := skipStats(dAtA[start:]) 476 if err != nil { 477 return 0, err 478 } 479 iNdEx = start + next 480 if iNdEx < 0 { 481 return 0, ErrInvalidLengthStats 482 } 483 } 484 return iNdEx, nil 485 case 4: 486 return iNdEx, nil 487 case 5: 488 iNdEx += 4 489 return iNdEx, nil 490 default: 491 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 492 } 493 } 494 panic("unreachable") 495 } 496 497 var ( 498 ErrInvalidLengthStats = fmt.Errorf("proto: negative length found during unmarshaling") 499 ErrIntOverflowStats = fmt.Errorf("proto: integer overflow") 500 )