github.com/grafana/pyroscope@v1.18.0/pkg/querier/stats/stats_vtproto.pb.go (about) 1 // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. 2 // protoc-gen-go-vtproto version: v0.6.0 3 // source: querier/stats/stats.proto 4 5 package stats 6 7 import ( 8 fmt "fmt" 9 protohelpers "github.com/planetscale/vtprotobuf/protohelpers" 10 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 11 io "io" 12 ) 13 14 const ( 15 // Verify that this generated code is sufficiently up-to-date. 16 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 17 // Verify that runtime/protoimpl is sufficiently up-to-date. 18 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 19 ) 20 21 func (m *Stats) MarshalVT() (dAtA []byte, err error) { 22 if m == nil { 23 return nil, nil 24 } 25 size := m.SizeVT() 26 dAtA = make([]byte, size) 27 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 28 if err != nil { 29 return nil, err 30 } 31 return dAtA[:n], nil 32 } 33 34 func (m *Stats) MarshalToVT(dAtA []byte) (int, error) { 35 size := m.SizeVT() 36 return m.MarshalToSizedBufferVT(dAtA[:size]) 37 } 38 39 func (m *Stats) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 40 if m == nil { 41 return 0, nil 42 } 43 i := len(dAtA) 44 _ = i 45 var l int 46 _ = l 47 if m.unknownFields != nil { 48 i -= len(m.unknownFields) 49 copy(dAtA[i:], m.unknownFields) 50 } 51 if m.FetchedIndexBytes != 0 { 52 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FetchedIndexBytes)) 53 i-- 54 dAtA[i] = 0x38 55 } 56 if m.SplitQueries != 0 { 57 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SplitQueries)) 58 i-- 59 dAtA[i] = 0x30 60 } 61 if m.ShardedQueries != 0 { 62 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ShardedQueries)) 63 i-- 64 dAtA[i] = 0x28 65 } 66 if m.FetchedChunksCount != 0 { 67 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FetchedChunksCount)) 68 i-- 69 dAtA[i] = 0x20 70 } 71 if m.FetchedChunkBytes != 0 { 72 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FetchedChunkBytes)) 73 i-- 74 dAtA[i] = 0x18 75 } 76 if m.FetchedSeriesCount != 0 { 77 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.FetchedSeriesCount)) 78 i-- 79 dAtA[i] = 0x10 80 } 81 if m.WallTime != 0 { 82 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.WallTime)) 83 i-- 84 dAtA[i] = 0x8 85 } 86 return len(dAtA) - i, nil 87 } 88 89 func (m *Stats) SizeVT() (n int) { 90 if m == nil { 91 return 0 92 } 93 var l int 94 _ = l 95 if m.WallTime != 0 { 96 n += 1 + protohelpers.SizeOfVarint(uint64(m.WallTime)) 97 } 98 if m.FetchedSeriesCount != 0 { 99 n += 1 + protohelpers.SizeOfVarint(uint64(m.FetchedSeriesCount)) 100 } 101 if m.FetchedChunkBytes != 0 { 102 n += 1 + protohelpers.SizeOfVarint(uint64(m.FetchedChunkBytes)) 103 } 104 if m.FetchedChunksCount != 0 { 105 n += 1 + protohelpers.SizeOfVarint(uint64(m.FetchedChunksCount)) 106 } 107 if m.ShardedQueries != 0 { 108 n += 1 + protohelpers.SizeOfVarint(uint64(m.ShardedQueries)) 109 } 110 if m.SplitQueries != 0 { 111 n += 1 + protohelpers.SizeOfVarint(uint64(m.SplitQueries)) 112 } 113 if m.FetchedIndexBytes != 0 { 114 n += 1 + protohelpers.SizeOfVarint(uint64(m.FetchedIndexBytes)) 115 } 116 n += len(m.unknownFields) 117 return n 118 } 119 120 func (m *Stats) UnmarshalVT(dAtA []byte) error { 121 l := len(dAtA) 122 iNdEx := 0 123 for iNdEx < l { 124 preIndex := iNdEx 125 var wire uint64 126 for shift := uint(0); ; shift += 7 { 127 if shift >= 64 { 128 return protohelpers.ErrIntOverflow 129 } 130 if iNdEx >= l { 131 return io.ErrUnexpectedEOF 132 } 133 b := dAtA[iNdEx] 134 iNdEx++ 135 wire |= uint64(b&0x7F) << shift 136 if b < 0x80 { 137 break 138 } 139 } 140 fieldNum := int32(wire >> 3) 141 wireType := int(wire & 0x7) 142 if wireType == 4 { 143 return fmt.Errorf("proto: Stats: wiretype end group for non-group") 144 } 145 if fieldNum <= 0 { 146 return fmt.Errorf("proto: Stats: illegal tag %d (wire type %d)", fieldNum, wire) 147 } 148 switch fieldNum { 149 case 1: 150 if wireType != 0 { 151 return fmt.Errorf("proto: wrong wireType = %d for field WallTime", wireType) 152 } 153 m.WallTime = 0 154 for shift := uint(0); ; shift += 7 { 155 if shift >= 64 { 156 return protohelpers.ErrIntOverflow 157 } 158 if iNdEx >= l { 159 return io.ErrUnexpectedEOF 160 } 161 b := dAtA[iNdEx] 162 iNdEx++ 163 m.WallTime |= int64(b&0x7F) << shift 164 if b < 0x80 { 165 break 166 } 167 } 168 case 2: 169 if wireType != 0 { 170 return fmt.Errorf("proto: wrong wireType = %d for field FetchedSeriesCount", wireType) 171 } 172 m.FetchedSeriesCount = 0 173 for shift := uint(0); ; shift += 7 { 174 if shift >= 64 { 175 return protohelpers.ErrIntOverflow 176 } 177 if iNdEx >= l { 178 return io.ErrUnexpectedEOF 179 } 180 b := dAtA[iNdEx] 181 iNdEx++ 182 m.FetchedSeriesCount |= uint64(b&0x7F) << shift 183 if b < 0x80 { 184 break 185 } 186 } 187 case 3: 188 if wireType != 0 { 189 return fmt.Errorf("proto: wrong wireType = %d for field FetchedChunkBytes", wireType) 190 } 191 m.FetchedChunkBytes = 0 192 for shift := uint(0); ; shift += 7 { 193 if shift >= 64 { 194 return protohelpers.ErrIntOverflow 195 } 196 if iNdEx >= l { 197 return io.ErrUnexpectedEOF 198 } 199 b := dAtA[iNdEx] 200 iNdEx++ 201 m.FetchedChunkBytes |= uint64(b&0x7F) << shift 202 if b < 0x80 { 203 break 204 } 205 } 206 case 4: 207 if wireType != 0 { 208 return fmt.Errorf("proto: wrong wireType = %d for field FetchedChunksCount", wireType) 209 } 210 m.FetchedChunksCount = 0 211 for shift := uint(0); ; shift += 7 { 212 if shift >= 64 { 213 return protohelpers.ErrIntOverflow 214 } 215 if iNdEx >= l { 216 return io.ErrUnexpectedEOF 217 } 218 b := dAtA[iNdEx] 219 iNdEx++ 220 m.FetchedChunksCount |= uint64(b&0x7F) << shift 221 if b < 0x80 { 222 break 223 } 224 } 225 case 5: 226 if wireType != 0 { 227 return fmt.Errorf("proto: wrong wireType = %d for field ShardedQueries", wireType) 228 } 229 m.ShardedQueries = 0 230 for shift := uint(0); ; shift += 7 { 231 if shift >= 64 { 232 return protohelpers.ErrIntOverflow 233 } 234 if iNdEx >= l { 235 return io.ErrUnexpectedEOF 236 } 237 b := dAtA[iNdEx] 238 iNdEx++ 239 m.ShardedQueries |= uint32(b&0x7F) << shift 240 if b < 0x80 { 241 break 242 } 243 } 244 case 6: 245 if wireType != 0 { 246 return fmt.Errorf("proto: wrong wireType = %d for field SplitQueries", wireType) 247 } 248 m.SplitQueries = 0 249 for shift := uint(0); ; shift += 7 { 250 if shift >= 64 { 251 return protohelpers.ErrIntOverflow 252 } 253 if iNdEx >= l { 254 return io.ErrUnexpectedEOF 255 } 256 b := dAtA[iNdEx] 257 iNdEx++ 258 m.SplitQueries |= uint32(b&0x7F) << shift 259 if b < 0x80 { 260 break 261 } 262 } 263 case 7: 264 if wireType != 0 { 265 return fmt.Errorf("proto: wrong wireType = %d for field FetchedIndexBytes", wireType) 266 } 267 m.FetchedIndexBytes = 0 268 for shift := uint(0); ; shift += 7 { 269 if shift >= 64 { 270 return protohelpers.ErrIntOverflow 271 } 272 if iNdEx >= l { 273 return io.ErrUnexpectedEOF 274 } 275 b := dAtA[iNdEx] 276 iNdEx++ 277 m.FetchedIndexBytes |= uint64(b&0x7F) << shift 278 if b < 0x80 { 279 break 280 } 281 } 282 default: 283 iNdEx = preIndex 284 skippy, err := protohelpers.Skip(dAtA[iNdEx:]) 285 if err != nil { 286 return err 287 } 288 if (skippy < 0) || (iNdEx+skippy) < 0 { 289 return protohelpers.ErrInvalidLength 290 } 291 if (iNdEx + skippy) > l { 292 return io.ErrUnexpectedEOF 293 } 294 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 295 iNdEx += skippy 296 } 297 } 298 299 if iNdEx > l { 300 return io.ErrUnexpectedEOF 301 } 302 return nil 303 }