mirror of https://github.com/grafana/loki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3541 lines
80 KiB
3541 lines
80 KiB
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: pkg/logproto/sketch.proto
|
|
|
|
package logproto
|
|
|
|
import (
|
|
bytes "bytes"
|
|
encoding_binary "encoding/binary"
|
|
fmt "fmt"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
reflect "reflect"
|
|
strings "strings"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
type QuantileSketchMatrix struct {
|
|
Values []*QuantileSketchVector `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
|
|
}
|
|
|
|
func (m *QuantileSketchMatrix) Reset() { *m = QuantileSketchMatrix{} }
|
|
func (*QuantileSketchMatrix) ProtoMessage() {}
|
|
func (*QuantileSketchMatrix) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_7f9fd40e59b87ff3, []int{0}
|
|
}
|
|
func (m *QuantileSketchMatrix) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QuantileSketchMatrix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QuantileSketchMatrix.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QuantileSketchMatrix) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QuantileSketchMatrix.Merge(m, src)
|
|
}
|
|
func (m *QuantileSketchMatrix) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QuantileSketchMatrix) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QuantileSketchMatrix.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QuantileSketchMatrix proto.InternalMessageInfo
|
|
|
|
func (m *QuantileSketchMatrix) GetValues() []*QuantileSketchVector {
|
|
if m != nil {
|
|
return m.Values
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type QuantileSketchVector struct {
|
|
Samples []*QuantileSketchSample `protobuf:"bytes,1,rep,name=samples,proto3" json:"samples,omitempty"`
|
|
}
|
|
|
|
func (m *QuantileSketchVector) Reset() { *m = QuantileSketchVector{} }
|
|
func (*QuantileSketchVector) ProtoMessage() {}
|
|
func (*QuantileSketchVector) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_7f9fd40e59b87ff3, []int{1}
|
|
}
|
|
func (m *QuantileSketchVector) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QuantileSketchVector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QuantileSketchVector.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QuantileSketchVector) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QuantileSketchVector.Merge(m, src)
|
|
}
|
|
func (m *QuantileSketchVector) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QuantileSketchVector) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QuantileSketchVector.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QuantileSketchVector proto.InternalMessageInfo
|
|
|
|
func (m *QuantileSketchVector) GetSamples() []*QuantileSketchSample {
|
|
if m != nil {
|
|
return m.Samples
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type QuantileSketchSample struct {
|
|
F *QuantileSketch `protobuf:"bytes,1,opt,name=f,proto3" json:"f,omitempty"`
|
|
TimestampMs int64 `protobuf:"varint,2,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"`
|
|
Metric []*LabelPair `protobuf:"bytes,3,rep,name=metric,proto3" json:"metric,omitempty"`
|
|
}
|
|
|
|
func (m *QuantileSketchSample) Reset() { *m = QuantileSketchSample{} }
|
|
func (*QuantileSketchSample) ProtoMessage() {}
|
|
func (*QuantileSketchSample) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_7f9fd40e59b87ff3, []int{2}
|
|
}
|
|
func (m *QuantileSketchSample) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QuantileSketchSample) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QuantileSketchSample.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QuantileSketchSample) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QuantileSketchSample.Merge(m, src)
|
|
}
|
|
func (m *QuantileSketchSample) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QuantileSketchSample) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QuantileSketchSample.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QuantileSketchSample proto.InternalMessageInfo
|
|
|
|
func (m *QuantileSketchSample) GetF() *QuantileSketch {
|
|
if m != nil {
|
|
return m.F
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *QuantileSketchSample) GetTimestampMs() int64 {
|
|
if m != nil {
|
|
return m.TimestampMs
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *QuantileSketchSample) GetMetric() []*LabelPair {
|
|
if m != nil {
|
|
return m.Metric
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type QuantileSketch struct {
|
|
// Types that are valid to be assigned to Sketch:
|
|
// *QuantileSketch_Tdigest
|
|
// *QuantileSketch_Ddsketch
|
|
Sketch isQuantileSketch_Sketch `protobuf_oneof:"sketch"`
|
|
}
|
|
|
|
func (m *QuantileSketch) Reset() { *m = QuantileSketch{} }
|
|
func (*QuantileSketch) ProtoMessage() {}
|
|
func (*QuantileSketch) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_7f9fd40e59b87ff3, []int{3}
|
|
}
|
|
func (m *QuantileSketch) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QuantileSketch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QuantileSketch.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *QuantileSketch) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QuantileSketch.Merge(m, src)
|
|
}
|
|
func (m *QuantileSketch) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QuantileSketch) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QuantileSketch.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QuantileSketch proto.InternalMessageInfo
|
|
|
|
type isQuantileSketch_Sketch interface {
|
|
isQuantileSketch_Sketch()
|
|
Equal(interface{}) bool
|
|
MarshalTo([]byte) (int, error)
|
|
Size() int
|
|
}
|
|
|
|
type QuantileSketch_Tdigest struct {
|
|
Tdigest *TDigest `protobuf:"bytes,1,opt,name=tdigest,proto3,oneof"`
|
|
}
|
|
type QuantileSketch_Ddsketch struct {
|
|
Ddsketch []byte `protobuf:"bytes,2,opt,name=ddsketch,proto3,oneof"`
|
|
}
|
|
|
|
func (*QuantileSketch_Tdigest) isQuantileSketch_Sketch() {}
|
|
func (*QuantileSketch_Ddsketch) isQuantileSketch_Sketch() {}
|
|
|
|
func (m *QuantileSketch) GetSketch() isQuantileSketch_Sketch {
|
|
if m != nil {
|
|
return m.Sketch
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *QuantileSketch) GetTdigest() *TDigest {
|
|
if x, ok := m.GetSketch().(*QuantileSketch_Tdigest); ok {
|
|
return x.Tdigest
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *QuantileSketch) GetDdsketch() []byte {
|
|
if x, ok := m.GetSketch().(*QuantileSketch_Ddsketch); ok {
|
|
return x.Ddsketch
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// XXX_OneofWrappers is for the internal use of the proto package.
|
|
func (*QuantileSketch) XXX_OneofWrappers() []interface{} {
|
|
return []interface{}{
|
|
(*QuantileSketch_Tdigest)(nil),
|
|
(*QuantileSketch_Ddsketch)(nil),
|
|
}
|
|
}
|
|
|
|
// "Large" bytes format from https://github.com/tdunning/t-digest
|
|
type TDigest struct {
|
|
Min float64 `protobuf:"fixed64,1,opt,name=min,proto3" json:"min,omitempty"`
|
|
Max float64 `protobuf:"fixed64,2,opt,name=max,proto3" json:"max,omitempty"`
|
|
Compression float64 `protobuf:"fixed64,3,opt,name=compression,proto3" json:"compression,omitempty"`
|
|
Processed []*TDigest_Centroid `protobuf:"bytes,4,rep,name=processed,proto3" json:"processed,omitempty"`
|
|
}
|
|
|
|
func (m *TDigest) Reset() { *m = TDigest{} }
|
|
func (*TDigest) ProtoMessage() {}
|
|
func (*TDigest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_7f9fd40e59b87ff3, []int{4}
|
|
}
|
|
func (m *TDigest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *TDigest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_TDigest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *TDigest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TDigest.Merge(m, src)
|
|
}
|
|
func (m *TDigest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *TDigest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TDigest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TDigest proto.InternalMessageInfo
|
|
|
|
func (m *TDigest) GetMin() float64 {
|
|
if m != nil {
|
|
return m.Min
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *TDigest) GetMax() float64 {
|
|
if m != nil {
|
|
return m.Max
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *TDigest) GetCompression() float64 {
|
|
if m != nil {
|
|
return m.Compression
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *TDigest) GetProcessed() []*TDigest_Centroid {
|
|
if m != nil {
|
|
return m.Processed
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type TDigest_Centroid struct {
|
|
Mean float64 `protobuf:"fixed64,1,opt,name=mean,proto3" json:"mean,omitempty"`
|
|
Weight float64 `protobuf:"fixed64,2,opt,name=weight,proto3" json:"weight,omitempty"`
|
|
}
|
|
|
|
func (m *TDigest_Centroid) Reset() { *m = TDigest_Centroid{} }
|
|
func (*TDigest_Centroid) ProtoMessage() {}
|
|
func (*TDigest_Centroid) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_7f9fd40e59b87ff3, []int{4, 0}
|
|
}
|
|
func (m *TDigest_Centroid) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *TDigest_Centroid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_TDigest_Centroid.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *TDigest_Centroid) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TDigest_Centroid.Merge(m, src)
|
|
}
|
|
func (m *TDigest_Centroid) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *TDigest_Centroid) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TDigest_Centroid.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TDigest_Centroid proto.InternalMessageInfo
|
|
|
|
func (m *TDigest_Centroid) GetMean() float64 {
|
|
if m != nil {
|
|
return m.Mean
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *TDigest_Centroid) GetWeight() float64 {
|
|
if m != nil {
|
|
return m.Weight
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type CountMinSketch struct {
|
|
Depth uint32 `protobuf:"varint,1,opt,name=depth,proto3" json:"depth,omitempty"`
|
|
Width uint32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"`
|
|
// counters is a matrix of depth * width.
|
|
Counters []uint32 `protobuf:"varint,3,rep,packed,name=counters,proto3" json:"counters,omitempty"`
|
|
}
|
|
|
|
func (m *CountMinSketch) Reset() { *m = CountMinSketch{} }
|
|
func (*CountMinSketch) ProtoMessage() {}
|
|
func (*CountMinSketch) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_7f9fd40e59b87ff3, []int{5}
|
|
}
|
|
func (m *CountMinSketch) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *CountMinSketch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_CountMinSketch.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *CountMinSketch) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CountMinSketch.Merge(m, src)
|
|
}
|
|
func (m *CountMinSketch) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *CountMinSketch) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CountMinSketch.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CountMinSketch proto.InternalMessageInfo
|
|
|
|
func (m *CountMinSketch) GetDepth() uint32 {
|
|
if m != nil {
|
|
return m.Depth
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *CountMinSketch) GetWidth() uint32 {
|
|
if m != nil {
|
|
return m.Width
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *CountMinSketch) GetCounters() []uint32 {
|
|
if m != nil {
|
|
return m.Counters
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type TopK struct {
|
|
Cms *CountMinSketch `protobuf:"bytes,1,opt,name=cms,proto3" json:"cms,omitempty"`
|
|
List []*TopK_Pair `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"`
|
|
Hyperloglog []byte `protobuf:"bytes,3,opt,name=hyperloglog,proto3" json:"hyperloglog,omitempty"`
|
|
}
|
|
|
|
func (m *TopK) Reset() { *m = TopK{} }
|
|
func (*TopK) ProtoMessage() {}
|
|
func (*TopK) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_7f9fd40e59b87ff3, []int{6}
|
|
}
|
|
func (m *TopK) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *TopK) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_TopK.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *TopK) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TopK.Merge(m, src)
|
|
}
|
|
func (m *TopK) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *TopK) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TopK.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TopK proto.InternalMessageInfo
|
|
|
|
func (m *TopK) GetCms() *CountMinSketch {
|
|
if m != nil {
|
|
return m.Cms
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TopK) GetList() []*TopK_Pair {
|
|
if m != nil {
|
|
return m.List
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TopK) GetHyperloglog() []byte {
|
|
if m != nil {
|
|
return m.Hyperloglog
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type TopK_Pair struct {
|
|
Event string `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
|
|
Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
|
|
}
|
|
|
|
func (m *TopK_Pair) Reset() { *m = TopK_Pair{} }
|
|
func (*TopK_Pair) ProtoMessage() {}
|
|
func (*TopK_Pair) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_7f9fd40e59b87ff3, []int{6, 0}
|
|
}
|
|
func (m *TopK_Pair) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *TopK_Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_TopK_Pair.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *TopK_Pair) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TopK_Pair.Merge(m, src)
|
|
}
|
|
func (m *TopK_Pair) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *TopK_Pair) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TopK_Pair.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TopK_Pair proto.InternalMessageInfo
|
|
|
|
func (m *TopK_Pair) GetEvent() string {
|
|
if m != nil {
|
|
return m.Event
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *TopK_Pair) GetCount() uint32 {
|
|
if m != nil {
|
|
return m.Count
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type TopKMatrix struct {
|
|
Values []*TopKMatrix_Vector `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
|
|
}
|
|
|
|
func (m *TopKMatrix) Reset() { *m = TopKMatrix{} }
|
|
func (*TopKMatrix) ProtoMessage() {}
|
|
func (*TopKMatrix) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_7f9fd40e59b87ff3, []int{7}
|
|
}
|
|
func (m *TopKMatrix) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *TopKMatrix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_TopKMatrix.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *TopKMatrix) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TopKMatrix.Merge(m, src)
|
|
}
|
|
func (m *TopKMatrix) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *TopKMatrix) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TopKMatrix.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TopKMatrix proto.InternalMessageInfo
|
|
|
|
func (m *TopKMatrix) GetValues() []*TopKMatrix_Vector {
|
|
if m != nil {
|
|
return m.Values
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type TopKMatrix_Vector struct {
|
|
Topk *TopK `protobuf:"bytes,1,opt,name=topk,proto3" json:"topk,omitempty"`
|
|
TimestampMs int64 `protobuf:"varint,2,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"`
|
|
}
|
|
|
|
func (m *TopKMatrix_Vector) Reset() { *m = TopKMatrix_Vector{} }
|
|
func (*TopKMatrix_Vector) ProtoMessage() {}
|
|
func (*TopKMatrix_Vector) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_7f9fd40e59b87ff3, []int{7, 0}
|
|
}
|
|
func (m *TopKMatrix_Vector) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *TopKMatrix_Vector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_TopKMatrix_Vector.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *TopKMatrix_Vector) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TopKMatrix_Vector.Merge(m, src)
|
|
}
|
|
func (m *TopKMatrix_Vector) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *TopKMatrix_Vector) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TopKMatrix_Vector.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TopKMatrix_Vector proto.InternalMessageInfo
|
|
|
|
func (m *TopKMatrix_Vector) GetTopk() *TopK {
|
|
if m != nil {
|
|
return m.Topk
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TopKMatrix_Vector) GetTimestampMs() int64 {
|
|
if m != nil {
|
|
return m.TimestampMs
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*QuantileSketchMatrix)(nil), "logproto.QuantileSketchMatrix")
|
|
proto.RegisterType((*QuantileSketchVector)(nil), "logproto.QuantileSketchVector")
|
|
proto.RegisterType((*QuantileSketchSample)(nil), "logproto.QuantileSketchSample")
|
|
proto.RegisterType((*QuantileSketch)(nil), "logproto.QuantileSketch")
|
|
proto.RegisterType((*TDigest)(nil), "logproto.TDigest")
|
|
proto.RegisterType((*TDigest_Centroid)(nil), "logproto.TDigest.Centroid")
|
|
proto.RegisterType((*CountMinSketch)(nil), "logproto.CountMinSketch")
|
|
proto.RegisterType((*TopK)(nil), "logproto.TopK")
|
|
proto.RegisterType((*TopK_Pair)(nil), "logproto.TopK.Pair")
|
|
proto.RegisterType((*TopKMatrix)(nil), "logproto.TopKMatrix")
|
|
proto.RegisterType((*TopKMatrix_Vector)(nil), "logproto.TopKMatrix.Vector")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("pkg/logproto/sketch.proto", fileDescriptor_7f9fd40e59b87ff3) }
|
|
|
|
var fileDescriptor_7f9fd40e59b87ff3 = []byte{
|
|
// 626 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x41, 0x4f, 0xd4, 0x4e,
|
|
0x14, 0xef, 0xfc, 0x77, 0xff, 0xcb, 0xf2, 0x16, 0x88, 0x8e, 0xc4, 0xd4, 0xc5, 0x4c, 0xd6, 0x1e,
|
|
0x84, 0x68, 0xdc, 0x4d, 0x20, 0x21, 0x9c, 0xc1, 0x03, 0x89, 0xa2, 0x38, 0x10, 0x63, 0x4c, 0x8c,
|
|
0x19, 0xda, 0xa1, 0x3b, 0xd9, 0xb6, 0xd3, 0x74, 0x66, 0x01, 0x6f, 0x7e, 0x02, 0x63, 0xfc, 0x14,
|
|
0x5e, 0xfd, 0x08, 0xde, 0x3c, 0x72, 0xe4, 0x28, 0xe5, 0xe2, 0x91, 0x8f, 0x60, 0x66, 0xda, 0x2e,
|
|
0x74, 0x89, 0xd1, 0xd3, 0xce, 0xfb, 0xbd, 0xdf, 0xfb, 0xcd, 0x6f, 0xde, 0xeb, 0x5b, 0xb8, 0x97,
|
|
0x8e, 0xc2, 0x41, 0x24, 0xc3, 0x34, 0x93, 0x5a, 0x0e, 0xd4, 0x88, 0x6b, 0x7f, 0xd8, 0xb7, 0x01,
|
|
0x6e, 0x57, 0x70, 0x77, 0xa9, 0x46, 0xaa, 0x0e, 0x05, 0xcd, 0x7b, 0x01, 0x8b, 0xaf, 0xc6, 0x2c,
|
|
0xd1, 0x22, 0xe2, 0x7b, 0xb6, 0x7c, 0x87, 0xe9, 0x4c, 0x9c, 0xe0, 0x75, 0x68, 0x1d, 0xb1, 0x68,
|
|
0xcc, 0x95, 0x8b, 0x7a, 0x8d, 0x95, 0xce, 0x2a, 0xe9, 0x4f, 0x0a, 0xeb, 0xfc, 0xd7, 0xdc, 0xd7,
|
|
0x32, 0xa3, 0x25, 0xdb, 0xdb, 0x9d, 0xd6, 0x2b, 0xf2, 0x78, 0x03, 0x66, 0x14, 0x8b, 0xd3, 0xe8,
|
|
0xef, 0x82, 0x7b, 0x96, 0x46, 0x2b, 0xba, 0xf7, 0x09, 0x4d, 0x4b, 0x16, 0x0c, 0xfc, 0x10, 0xd0,
|
|
0xa1, 0x8b, 0x7a, 0x68, 0xa5, 0xb3, 0xea, 0xfe, 0x49, 0x8c, 0xa2, 0x43, 0xfc, 0x00, 0xe6, 0xb4,
|
|
0x88, 0xb9, 0xd2, 0x2c, 0x4e, 0xdf, 0xc7, 0xca, 0xfd, 0xaf, 0x87, 0x56, 0x1a, 0xb4, 0x33, 0xc1,
|
|
0x76, 0x14, 0x7e, 0x0c, 0xad, 0x98, 0xeb, 0x4c, 0xf8, 0x6e, 0xc3, 0x9a, 0xbb, 0x73, 0xa5, 0xf7,
|
|
0x9c, 0x1d, 0xf0, 0x68, 0x97, 0x89, 0x8c, 0x96, 0x14, 0x2f, 0x84, 0x85, 0xfa, 0x25, 0xf8, 0x09,
|
|
0xcc, 0xe8, 0x40, 0x84, 0x5c, 0xe9, 0xd2, 0xcf, 0xed, 0xab, 0xfa, 0xfd, 0xa7, 0x36, 0xb1, 0xed,
|
|
0xd0, 0x8a, 0x83, 0xef, 0x43, 0x3b, 0x08, 0x8a, 0x61, 0x59, 0x33, 0x73, 0xdb, 0x0e, 0x9d, 0x20,
|
|
0x9b, 0x6d, 0x68, 0x15, 0x27, 0xef, 0x3b, 0x82, 0x99, 0xb2, 0x1c, 0xdf, 0x82, 0x46, 0x2c, 0x12,
|
|
0x2b, 0x8f, 0xa8, 0x39, 0x5a, 0x84, 0x9d, 0x58, 0x01, 0x83, 0xb0, 0x13, 0xdc, 0x83, 0x8e, 0x2f,
|
|
0xe3, 0x34, 0xe3, 0x4a, 0x09, 0x99, 0xb8, 0x0d, 0x9b, 0xb9, 0x0e, 0xe1, 0x0d, 0x98, 0x4d, 0x33,
|
|
0xe9, 0x73, 0xa5, 0x78, 0xe0, 0x36, 0xed, 0x53, 0xbb, 0x37, 0xac, 0xf6, 0xb7, 0x78, 0xa2, 0x33,
|
|
0x29, 0x02, 0x7a, 0x45, 0xee, 0xae, 0x43, 0xbb, 0x82, 0x31, 0x86, 0x66, 0xcc, 0x59, 0x65, 0xc6,
|
|
0x9e, 0xf1, 0x5d, 0x68, 0x1d, 0x73, 0x11, 0x0e, 0x75, 0x69, 0xa8, 0x8c, 0xbc, 0x37, 0xb0, 0xb0,
|
|
0x25, 0xc7, 0x89, 0xde, 0x11, 0x49, 0xd9, 0xac, 0x45, 0xf8, 0x3f, 0xe0, 0xa9, 0x1e, 0xda, 0xf2,
|
|
0x79, 0x5a, 0x04, 0x06, 0x3d, 0x16, 0x81, 0x2e, 0x1a, 0x32, 0x4f, 0x8b, 0x00, 0x77, 0xa1, 0xed,
|
|
0x9b, 0x6a, 0x9e, 0x29, 0x3b, 0x99, 0x79, 0x3a, 0x89, 0xbd, 0x6f, 0x08, 0x9a, 0xfb, 0x32, 0x7d,
|
|
0x86, 0x1f, 0x41, 0xc3, 0x8f, 0xd5, 0xcd, 0x2f, 0xa1, 0x7e, 0x2f, 0x35, 0x24, 0xbc, 0x0c, 0xcd,
|
|
0x48, 0x28, 0x63, 0x72, 0x6a, 0xcc, 0x46, 0xa9, 0x6f, 0xc7, 0x6c, 0x09, 0xa6, 0x97, 0xc3, 0x0f,
|
|
0x29, 0xcf, 0x22, 0x19, 0x46, 0x32, 0xb4, 0xbd, 0x9c, 0xa3, 0xd7, 0xa1, 0xee, 0x2a, 0x34, 0x0d,
|
|
0xdf, 0x38, 0xe7, 0x47, 0x3c, 0x29, 0x46, 0x3f, 0x4b, 0x8b, 0xc0, 0xa0, 0xd6, 0x69, 0xf5, 0x1e,
|
|
0x1b, 0x78, 0x5f, 0x10, 0x80, 0xb9, 0xa9, 0x5c, 0xb2, 0xb5, 0xa9, 0x25, 0x5b, 0xaa, 0xfb, 0x29,
|
|
0x58, 0xfd, 0xfa, 0x86, 0x75, 0x5f, 0x42, 0xab, 0xdc, 0x29, 0x0f, 0x9a, 0x5a, 0xa6, 0xa3, 0xf2,
|
|
0xe5, 0x0b, 0xf5, 0x62, 0x6a, 0x73, 0xff, 0xf0, 0xf1, 0x6f, 0xbe, 0x3b, 0x3d, 0x27, 0xce, 0xd9,
|
|
0x39, 0x71, 0x2e, 0xcf, 0x09, 0xfa, 0x98, 0x13, 0xf4, 0x35, 0x27, 0xe8, 0x47, 0x4e, 0xd0, 0x69,
|
|
0x4e, 0xd0, 0xcf, 0x9c, 0xa0, 0x5f, 0x39, 0x71, 0x2e, 0x73, 0x82, 0x3e, 0x5f, 0x10, 0xe7, 0xf4,
|
|
0x82, 0x38, 0x67, 0x17, 0xc4, 0x79, 0xbb, 0x1c, 0x0a, 0x3d, 0x1c, 0x1f, 0xf4, 0x7d, 0x19, 0x0f,
|
|
0xc2, 0x8c, 0x1d, 0xb2, 0x84, 0x0d, 0x22, 0x39, 0x12, 0x83, 0xa3, 0xb5, 0xc1, 0xf5, 0x3f, 0x9c,
|
|
0x83, 0x96, 0xfd, 0x59, 0xfb, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x82, 0x05, 0x2f, 0xac, 0x04,
|
|
0x00, 0x00,
|
|
}
|
|
|
|
func (this *QuantileSketchMatrix) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*QuantileSketchMatrix)
|
|
if !ok {
|
|
that2, ok := that.(QuantileSketchMatrix)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if len(this.Values) != len(that1.Values) {
|
|
return false
|
|
}
|
|
for i := range this.Values {
|
|
if !this.Values[i].Equal(that1.Values[i]) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
func (this *QuantileSketchVector) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*QuantileSketchVector)
|
|
if !ok {
|
|
that2, ok := that.(QuantileSketchVector)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if len(this.Samples) != len(that1.Samples) {
|
|
return false
|
|
}
|
|
for i := range this.Samples {
|
|
if !this.Samples[i].Equal(that1.Samples[i]) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
func (this *QuantileSketchSample) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*QuantileSketchSample)
|
|
if !ok {
|
|
that2, ok := that.(QuantileSketchSample)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if !this.F.Equal(that1.F) {
|
|
return false
|
|
}
|
|
if this.TimestampMs != that1.TimestampMs {
|
|
return false
|
|
}
|
|
if len(this.Metric) != len(that1.Metric) {
|
|
return false
|
|
}
|
|
for i := range this.Metric {
|
|
if !this.Metric[i].Equal(that1.Metric[i]) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
func (this *QuantileSketch) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*QuantileSketch)
|
|
if !ok {
|
|
that2, ok := that.(QuantileSketch)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if that1.Sketch == nil {
|
|
if this.Sketch != nil {
|
|
return false
|
|
}
|
|
} else if this.Sketch == nil {
|
|
return false
|
|
} else if !this.Sketch.Equal(that1.Sketch) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *QuantileSketch_Tdigest) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*QuantileSketch_Tdigest)
|
|
if !ok {
|
|
that2, ok := that.(QuantileSketch_Tdigest)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if !this.Tdigest.Equal(that1.Tdigest) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *QuantileSketch_Ddsketch) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*QuantileSketch_Ddsketch)
|
|
if !ok {
|
|
that2, ok := that.(QuantileSketch_Ddsketch)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if !bytes.Equal(this.Ddsketch, that1.Ddsketch) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *TDigest) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*TDigest)
|
|
if !ok {
|
|
that2, ok := that.(TDigest)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.Min != that1.Min {
|
|
return false
|
|
}
|
|
if this.Max != that1.Max {
|
|
return false
|
|
}
|
|
if this.Compression != that1.Compression {
|
|
return false
|
|
}
|
|
if len(this.Processed) != len(that1.Processed) {
|
|
return false
|
|
}
|
|
for i := range this.Processed {
|
|
if !this.Processed[i].Equal(that1.Processed[i]) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
func (this *TDigest_Centroid) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*TDigest_Centroid)
|
|
if !ok {
|
|
that2, ok := that.(TDigest_Centroid)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.Mean != that1.Mean {
|
|
return false
|
|
}
|
|
if this.Weight != that1.Weight {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *CountMinSketch) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*CountMinSketch)
|
|
if !ok {
|
|
that2, ok := that.(CountMinSketch)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.Depth != that1.Depth {
|
|
return false
|
|
}
|
|
if this.Width != that1.Width {
|
|
return false
|
|
}
|
|
if len(this.Counters) != len(that1.Counters) {
|
|
return false
|
|
}
|
|
for i := range this.Counters {
|
|
if this.Counters[i] != that1.Counters[i] {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
func (this *TopK) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*TopK)
|
|
if !ok {
|
|
that2, ok := that.(TopK)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if !this.Cms.Equal(that1.Cms) {
|
|
return false
|
|
}
|
|
if len(this.List) != len(that1.List) {
|
|
return false
|
|
}
|
|
for i := range this.List {
|
|
if !this.List[i].Equal(that1.List[i]) {
|
|
return false
|
|
}
|
|
}
|
|
if !bytes.Equal(this.Hyperloglog, that1.Hyperloglog) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *TopK_Pair) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*TopK_Pair)
|
|
if !ok {
|
|
that2, ok := that.(TopK_Pair)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.Event != that1.Event {
|
|
return false
|
|
}
|
|
if this.Count != that1.Count {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *TopKMatrix) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*TopKMatrix)
|
|
if !ok {
|
|
that2, ok := that.(TopKMatrix)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if len(this.Values) != len(that1.Values) {
|
|
return false
|
|
}
|
|
for i := range this.Values {
|
|
if !this.Values[i].Equal(that1.Values[i]) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
func (this *TopKMatrix_Vector) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*TopKMatrix_Vector)
|
|
if !ok {
|
|
that2, ok := that.(TopKMatrix_Vector)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if !this.Topk.Equal(that1.Topk) {
|
|
return false
|
|
}
|
|
if this.TimestampMs != that1.TimestampMs {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *QuantileSketchMatrix) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&logproto.QuantileSketchMatrix{")
|
|
if this.Values != nil {
|
|
s = append(s, "Values: "+fmt.Sprintf("%#v", this.Values)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *QuantileSketchVector) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&logproto.QuantileSketchVector{")
|
|
if this.Samples != nil {
|
|
s = append(s, "Samples: "+fmt.Sprintf("%#v", this.Samples)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *QuantileSketchSample) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 7)
|
|
s = append(s, "&logproto.QuantileSketchSample{")
|
|
if this.F != nil {
|
|
s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n")
|
|
}
|
|
s = append(s, "TimestampMs: "+fmt.Sprintf("%#v", this.TimestampMs)+",\n")
|
|
if this.Metric != nil {
|
|
s = append(s, "Metric: "+fmt.Sprintf("%#v", this.Metric)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *QuantileSketch) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 6)
|
|
s = append(s, "&logproto.QuantileSketch{")
|
|
if this.Sketch != nil {
|
|
s = append(s, "Sketch: "+fmt.Sprintf("%#v", this.Sketch)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *QuantileSketch_Tdigest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&logproto.QuantileSketch_Tdigest{` +
|
|
`Tdigest:` + fmt.Sprintf("%#v", this.Tdigest) + `}`}, ", ")
|
|
return s
|
|
}
|
|
func (this *QuantileSketch_Ddsketch) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&logproto.QuantileSketch_Ddsketch{` +
|
|
`Ddsketch:` + fmt.Sprintf("%#v", this.Ddsketch) + `}`}, ", ")
|
|
return s
|
|
}
|
|
func (this *TDigest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 8)
|
|
s = append(s, "&logproto.TDigest{")
|
|
s = append(s, "Min: "+fmt.Sprintf("%#v", this.Min)+",\n")
|
|
s = append(s, "Max: "+fmt.Sprintf("%#v", this.Max)+",\n")
|
|
s = append(s, "Compression: "+fmt.Sprintf("%#v", this.Compression)+",\n")
|
|
if this.Processed != nil {
|
|
s = append(s, "Processed: "+fmt.Sprintf("%#v", this.Processed)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *TDigest_Centroid) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 6)
|
|
s = append(s, "&logproto.TDigest_Centroid{")
|
|
s = append(s, "Mean: "+fmt.Sprintf("%#v", this.Mean)+",\n")
|
|
s = append(s, "Weight: "+fmt.Sprintf("%#v", this.Weight)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *CountMinSketch) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 7)
|
|
s = append(s, "&logproto.CountMinSketch{")
|
|
s = append(s, "Depth: "+fmt.Sprintf("%#v", this.Depth)+",\n")
|
|
s = append(s, "Width: "+fmt.Sprintf("%#v", this.Width)+",\n")
|
|
s = append(s, "Counters: "+fmt.Sprintf("%#v", this.Counters)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *TopK) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 7)
|
|
s = append(s, "&logproto.TopK{")
|
|
if this.Cms != nil {
|
|
s = append(s, "Cms: "+fmt.Sprintf("%#v", this.Cms)+",\n")
|
|
}
|
|
if this.List != nil {
|
|
s = append(s, "List: "+fmt.Sprintf("%#v", this.List)+",\n")
|
|
}
|
|
s = append(s, "Hyperloglog: "+fmt.Sprintf("%#v", this.Hyperloglog)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *TopK_Pair) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 6)
|
|
s = append(s, "&logproto.TopK_Pair{")
|
|
s = append(s, "Event: "+fmt.Sprintf("%#v", this.Event)+",\n")
|
|
s = append(s, "Count: "+fmt.Sprintf("%#v", this.Count)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *TopKMatrix) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&logproto.TopKMatrix{")
|
|
if this.Values != nil {
|
|
s = append(s, "Values: "+fmt.Sprintf("%#v", this.Values)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *TopKMatrix_Vector) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 6)
|
|
s = append(s, "&logproto.TopKMatrix_Vector{")
|
|
if this.Topk != nil {
|
|
s = append(s, "Topk: "+fmt.Sprintf("%#v", this.Topk)+",\n")
|
|
}
|
|
s = append(s, "TimestampMs: "+fmt.Sprintf("%#v", this.TimestampMs)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func valueToGoStringSketch(v interface{}, typ string) string {
|
|
rv := reflect.ValueOf(v)
|
|
if rv.IsNil() {
|
|
return "nil"
|
|
}
|
|
pv := reflect.Indirect(rv).Interface()
|
|
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
|
}
|
|
func (m *QuantileSketchMatrix) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QuantileSketchMatrix) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QuantileSketchMatrix) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Values) > 0 {
|
|
for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintSketch(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QuantileSketchVector) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QuantileSketchVector) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QuantileSketchVector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Samples) > 0 {
|
|
for iNdEx := len(m.Samples) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Samples[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintSketch(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QuantileSketchSample) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QuantileSketchSample) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QuantileSketchSample) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Metric) > 0 {
|
|
for iNdEx := len(m.Metric) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Metric[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintSketch(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
}
|
|
if m.TimestampMs != 0 {
|
|
i = encodeVarintSketch(dAtA, i, uint64(m.TimestampMs))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.F != nil {
|
|
{
|
|
size, err := m.F.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintSketch(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QuantileSketch) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *QuantileSketch) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QuantileSketch) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Sketch != nil {
|
|
{
|
|
size := m.Sketch.Size()
|
|
i -= size
|
|
if _, err := m.Sketch.MarshalTo(dAtA[i:]); err != nil {
|
|
return 0, err
|
|
}
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QuantileSketch_Tdigest) MarshalTo(dAtA []byte) (int, error) {
|
|
return m.MarshalToSizedBuffer(dAtA[:m.Size()])
|
|
}
|
|
|
|
func (m *QuantileSketch_Tdigest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
if m.Tdigest != nil {
|
|
{
|
|
size, err := m.Tdigest.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintSketch(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
func (m *QuantileSketch_Ddsketch) MarshalTo(dAtA []byte) (int, error) {
|
|
return m.MarshalToSizedBuffer(dAtA[:m.Size()])
|
|
}
|
|
|
|
func (m *QuantileSketch_Ddsketch) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
if m.Ddsketch != nil {
|
|
i -= len(m.Ddsketch)
|
|
copy(dAtA[i:], m.Ddsketch)
|
|
i = encodeVarintSketch(dAtA, i, uint64(len(m.Ddsketch)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
func (m *TDigest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *TDigest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TDigest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Processed) > 0 {
|
|
for iNdEx := len(m.Processed) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Processed[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintSketch(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
}
|
|
if m.Compression != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Compression))))
|
|
i--
|
|
dAtA[i] = 0x19
|
|
}
|
|
if m.Max != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Max))))
|
|
i--
|
|
dAtA[i] = 0x11
|
|
}
|
|
if m.Min != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Min))))
|
|
i--
|
|
dAtA[i] = 0x9
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *TDigest_Centroid) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *TDigest_Centroid) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TDigest_Centroid) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Weight != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Weight))))
|
|
i--
|
|
dAtA[i] = 0x11
|
|
}
|
|
if m.Mean != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Mean))))
|
|
i--
|
|
dAtA[i] = 0x9
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *CountMinSketch) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *CountMinSketch) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *CountMinSketch) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Counters) > 0 {
|
|
dAtA4 := make([]byte, len(m.Counters)*10)
|
|
var j3 int
|
|
for _, num := range m.Counters {
|
|
for num >= 1<<7 {
|
|
dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j3++
|
|
}
|
|
dAtA4[j3] = uint8(num)
|
|
j3++
|
|
}
|
|
i -= j3
|
|
copy(dAtA[i:], dAtA4[:j3])
|
|
i = encodeVarintSketch(dAtA, i, uint64(j3))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if m.Width != 0 {
|
|
i = encodeVarintSketch(dAtA, i, uint64(m.Width))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.Depth != 0 {
|
|
i = encodeVarintSketch(dAtA, i, uint64(m.Depth))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *TopK) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *TopK) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TopK) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Hyperloglog) > 0 {
|
|
i -= len(m.Hyperloglog)
|
|
copy(dAtA[i:], m.Hyperloglog)
|
|
i = encodeVarintSketch(dAtA, i, uint64(len(m.Hyperloglog)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.List) > 0 {
|
|
for iNdEx := len(m.List) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.List[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintSketch(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
}
|
|
if m.Cms != nil {
|
|
{
|
|
size, err := m.Cms.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintSketch(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *TopK_Pair) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *TopK_Pair) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TopK_Pair) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Count != 0 {
|
|
i = encodeVarintSketch(dAtA, i, uint64(m.Count))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if len(m.Event) > 0 {
|
|
i -= len(m.Event)
|
|
copy(dAtA[i:], m.Event)
|
|
i = encodeVarintSketch(dAtA, i, uint64(len(m.Event)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *TopKMatrix) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *TopKMatrix) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TopKMatrix) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Values) > 0 {
|
|
for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintSketch(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *TopKMatrix_Vector) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *TopKMatrix_Vector) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TopKMatrix_Vector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.TimestampMs != 0 {
|
|
i = encodeVarintSketch(dAtA, i, uint64(m.TimestampMs))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.Topk != nil {
|
|
{
|
|
size, err := m.Topk.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintSketch(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintSketch(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovSketch(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *QuantileSketchMatrix) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Values) > 0 {
|
|
for _, e := range m.Values {
|
|
l = e.Size()
|
|
n += 1 + l + sovSketch(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QuantileSketchVector) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Samples) > 0 {
|
|
for _, e := range m.Samples {
|
|
l = e.Size()
|
|
n += 1 + l + sovSketch(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QuantileSketchSample) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.F != nil {
|
|
l = m.F.Size()
|
|
n += 1 + l + sovSketch(uint64(l))
|
|
}
|
|
if m.TimestampMs != 0 {
|
|
n += 1 + sovSketch(uint64(m.TimestampMs))
|
|
}
|
|
if len(m.Metric) > 0 {
|
|
for _, e := range m.Metric {
|
|
l = e.Size()
|
|
n += 1 + l + sovSketch(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QuantileSketch) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Sketch != nil {
|
|
n += m.Sketch.Size()
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QuantileSketch_Tdigest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Tdigest != nil {
|
|
l = m.Tdigest.Size()
|
|
n += 1 + l + sovSketch(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
func (m *QuantileSketch_Ddsketch) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Ddsketch != nil {
|
|
l = len(m.Ddsketch)
|
|
n += 1 + l + sovSketch(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
func (m *TDigest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Min != 0 {
|
|
n += 9
|
|
}
|
|
if m.Max != 0 {
|
|
n += 9
|
|
}
|
|
if m.Compression != 0 {
|
|
n += 9
|
|
}
|
|
if len(m.Processed) > 0 {
|
|
for _, e := range m.Processed {
|
|
l = e.Size()
|
|
n += 1 + l + sovSketch(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *TDigest_Centroid) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Mean != 0 {
|
|
n += 9
|
|
}
|
|
if m.Weight != 0 {
|
|
n += 9
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *CountMinSketch) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Depth != 0 {
|
|
n += 1 + sovSketch(uint64(m.Depth))
|
|
}
|
|
if m.Width != 0 {
|
|
n += 1 + sovSketch(uint64(m.Width))
|
|
}
|
|
if len(m.Counters) > 0 {
|
|
l = 0
|
|
for _, e := range m.Counters {
|
|
l += sovSketch(uint64(e))
|
|
}
|
|
n += 1 + sovSketch(uint64(l)) + l
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *TopK) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Cms != nil {
|
|
l = m.Cms.Size()
|
|
n += 1 + l + sovSketch(uint64(l))
|
|
}
|
|
if len(m.List) > 0 {
|
|
for _, e := range m.List {
|
|
l = e.Size()
|
|
n += 1 + l + sovSketch(uint64(l))
|
|
}
|
|
}
|
|
l = len(m.Hyperloglog)
|
|
if l > 0 {
|
|
n += 1 + l + sovSketch(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *TopK_Pair) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Event)
|
|
if l > 0 {
|
|
n += 1 + l + sovSketch(uint64(l))
|
|
}
|
|
if m.Count != 0 {
|
|
n += 1 + sovSketch(uint64(m.Count))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *TopKMatrix) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Values) > 0 {
|
|
for _, e := range m.Values {
|
|
l = e.Size()
|
|
n += 1 + l + sovSketch(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *TopKMatrix_Vector) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Topk != nil {
|
|
l = m.Topk.Size()
|
|
n += 1 + l + sovSketch(uint64(l))
|
|
}
|
|
if m.TimestampMs != 0 {
|
|
n += 1 + sovSketch(uint64(m.TimestampMs))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovSketch(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozSketch(x uint64) (n int) {
|
|
return sovSketch(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (this *QuantileSketchMatrix) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
repeatedStringForValues := "[]*QuantileSketchVector{"
|
|
for _, f := range this.Values {
|
|
repeatedStringForValues += strings.Replace(f.String(), "QuantileSketchVector", "QuantileSketchVector", 1) + ","
|
|
}
|
|
repeatedStringForValues += "}"
|
|
s := strings.Join([]string{`&QuantileSketchMatrix{`,
|
|
`Values:` + repeatedStringForValues + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *QuantileSketchVector) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
repeatedStringForSamples := "[]*QuantileSketchSample{"
|
|
for _, f := range this.Samples {
|
|
repeatedStringForSamples += strings.Replace(f.String(), "QuantileSketchSample", "QuantileSketchSample", 1) + ","
|
|
}
|
|
repeatedStringForSamples += "}"
|
|
s := strings.Join([]string{`&QuantileSketchVector{`,
|
|
`Samples:` + repeatedStringForSamples + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *QuantileSketchSample) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
repeatedStringForMetric := "[]*LabelPair{"
|
|
for _, f := range this.Metric {
|
|
repeatedStringForMetric += strings.Replace(fmt.Sprintf("%v", f), "LabelPair", "LabelPair", 1) + ","
|
|
}
|
|
repeatedStringForMetric += "}"
|
|
s := strings.Join([]string{`&QuantileSketchSample{`,
|
|
`F:` + strings.Replace(this.F.String(), "QuantileSketch", "QuantileSketch", 1) + `,`,
|
|
`TimestampMs:` + fmt.Sprintf("%v", this.TimestampMs) + `,`,
|
|
`Metric:` + repeatedStringForMetric + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *QuantileSketch) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&QuantileSketch{`,
|
|
`Sketch:` + fmt.Sprintf("%v", this.Sketch) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *QuantileSketch_Tdigest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&QuantileSketch_Tdigest{`,
|
|
`Tdigest:` + strings.Replace(fmt.Sprintf("%v", this.Tdigest), "TDigest", "TDigest", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *QuantileSketch_Ddsketch) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&QuantileSketch_Ddsketch{`,
|
|
`Ddsketch:` + fmt.Sprintf("%v", this.Ddsketch) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *TDigest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
repeatedStringForProcessed := "[]*TDigest_Centroid{"
|
|
for _, f := range this.Processed {
|
|
repeatedStringForProcessed += strings.Replace(fmt.Sprintf("%v", f), "TDigest_Centroid", "TDigest_Centroid", 1) + ","
|
|
}
|
|
repeatedStringForProcessed += "}"
|
|
s := strings.Join([]string{`&TDigest{`,
|
|
`Min:` + fmt.Sprintf("%v", this.Min) + `,`,
|
|
`Max:` + fmt.Sprintf("%v", this.Max) + `,`,
|
|
`Compression:` + fmt.Sprintf("%v", this.Compression) + `,`,
|
|
`Processed:` + repeatedStringForProcessed + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *TDigest_Centroid) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&TDigest_Centroid{`,
|
|
`Mean:` + fmt.Sprintf("%v", this.Mean) + `,`,
|
|
`Weight:` + fmt.Sprintf("%v", this.Weight) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *CountMinSketch) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&CountMinSketch{`,
|
|
`Depth:` + fmt.Sprintf("%v", this.Depth) + `,`,
|
|
`Width:` + fmt.Sprintf("%v", this.Width) + `,`,
|
|
`Counters:` + fmt.Sprintf("%v", this.Counters) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *TopK) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
repeatedStringForList := "[]*TopK_Pair{"
|
|
for _, f := range this.List {
|
|
repeatedStringForList += strings.Replace(fmt.Sprintf("%v", f), "TopK_Pair", "TopK_Pair", 1) + ","
|
|
}
|
|
repeatedStringForList += "}"
|
|
s := strings.Join([]string{`&TopK{`,
|
|
`Cms:` + strings.Replace(this.Cms.String(), "CountMinSketch", "CountMinSketch", 1) + `,`,
|
|
`List:` + repeatedStringForList + `,`,
|
|
`Hyperloglog:` + fmt.Sprintf("%v", this.Hyperloglog) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *TopK_Pair) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&TopK_Pair{`,
|
|
`Event:` + fmt.Sprintf("%v", this.Event) + `,`,
|
|
`Count:` + fmt.Sprintf("%v", this.Count) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *TopKMatrix) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
repeatedStringForValues := "[]*TopKMatrix_Vector{"
|
|
for _, f := range this.Values {
|
|
repeatedStringForValues += strings.Replace(fmt.Sprintf("%v", f), "TopKMatrix_Vector", "TopKMatrix_Vector", 1) + ","
|
|
}
|
|
repeatedStringForValues += "}"
|
|
s := strings.Join([]string{`&TopKMatrix{`,
|
|
`Values:` + repeatedStringForValues + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *TopKMatrix_Vector) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&TopKMatrix_Vector{`,
|
|
`Topk:` + strings.Replace(this.Topk.String(), "TopK", "TopK", 1) + `,`,
|
|
`TimestampMs:` + fmt.Sprintf("%v", this.TimestampMs) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func valueToStringSketch(v interface{}) string {
|
|
rv := reflect.ValueOf(v)
|
|
if rv.IsNil() {
|
|
return "nil"
|
|
}
|
|
pv := reflect.Indirect(rv).Interface()
|
|
return fmt.Sprintf("*%v", pv)
|
|
}
|
|
func (m *QuantileSketchMatrix) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QuantileSketchMatrix: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QuantileSketchMatrix: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Values = append(m.Values, &QuantileSketchVector{})
|
|
if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSketch(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QuantileSketchVector) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QuantileSketchVector: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QuantileSketchVector: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Samples = append(m.Samples, &QuantileSketchSample{})
|
|
if err := m.Samples[len(m.Samples)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSketch(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QuantileSketchSample) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QuantileSketchSample: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QuantileSketchSample: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field F", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.F == nil {
|
|
m.F = &QuantileSketch{}
|
|
}
|
|
if err := m.F.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field TimestampMs", wireType)
|
|
}
|
|
m.TimestampMs = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.TimestampMs |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Metric", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Metric = append(m.Metric, &LabelPair{})
|
|
if err := m.Metric[len(m.Metric)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSketch(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *QuantileSketch) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: QuantileSketch: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QuantileSketch: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Tdigest", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v := &TDigest{}
|
|
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
m.Sketch = &QuantileSketch_Tdigest{v}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Ddsketch", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v := make([]byte, postIndex-iNdEx)
|
|
copy(v, dAtA[iNdEx:postIndex])
|
|
m.Sketch = &QuantileSketch_Ddsketch{v}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSketch(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *TDigest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: TDigest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: TDigest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Min = float64(math.Float64frombits(v))
|
|
case 2:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Max = float64(math.Float64frombits(v))
|
|
case 3:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Compression = float64(math.Float64frombits(v))
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Processed", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Processed = append(m.Processed, &TDigest_Centroid{})
|
|
if err := m.Processed[len(m.Processed)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSketch(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *TDigest_Centroid) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Centroid: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Centroid: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Mean", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Mean = float64(math.Float64frombits(v))
|
|
case 2:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Weight = float64(math.Float64frombits(v))
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSketch(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *CountMinSketch) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: CountMinSketch: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: CountMinSketch: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Depth", wireType)
|
|
}
|
|
m.Depth = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Depth |= uint32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType)
|
|
}
|
|
m.Width = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Width |= uint32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType == 0 {
|
|
var v uint32
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= uint32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Counters = append(m.Counters, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
var elementCount int
|
|
var count int
|
|
for _, integer := range dAtA[iNdEx:postIndex] {
|
|
if integer < 128 {
|
|
count++
|
|
}
|
|
}
|
|
elementCount = count
|
|
if elementCount != 0 && len(m.Counters) == 0 {
|
|
m.Counters = make([]uint32, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v uint32
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= uint32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Counters = append(m.Counters, v)
|
|
}
|
|
} else {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Counters", wireType)
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSketch(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *TopK) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: TopK: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: TopK: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Cms", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Cms == nil {
|
|
m.Cms = &CountMinSketch{}
|
|
}
|
|
if err := m.Cms.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field List", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.List = append(m.List, &TopK_Pair{})
|
|
if err := m.List[len(m.List)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Hyperloglog", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Hyperloglog = append(m.Hyperloglog[:0], dAtA[iNdEx:postIndex]...)
|
|
if m.Hyperloglog == nil {
|
|
m.Hyperloglog = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSketch(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *TopK_Pair) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Pair: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Pair: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Event = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
|
|
}
|
|
m.Count = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Count |= uint32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSketch(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *TopKMatrix) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: TopKMatrix: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: TopKMatrix: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Values = append(m.Values, &TopKMatrix_Vector{})
|
|
if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSketch(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *TopKMatrix_Vector) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Vector: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Vector: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Topk", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Topk == nil {
|
|
m.Topk = &TopK{}
|
|
}
|
|
if err := m.Topk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field TimestampMs", wireType)
|
|
}
|
|
m.TimestampMs = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.TimestampMs |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSketch(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSketch
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipSketch(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 1:
|
|
iNdEx += 8
|
|
return iNdEx, nil
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthSketch
|
|
}
|
|
iNdEx += length
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthSketch
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowSketch
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
innerWire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
innerWireType := int(innerWire & 0x7)
|
|
if innerWireType == 4 {
|
|
break
|
|
}
|
|
next, err := skipSketch(dAtA[start:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
iNdEx = start + next
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthSketch
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 4:
|
|
return iNdEx, nil
|
|
case 5:
|
|
iNdEx += 4
|
|
return iNdEx, nil
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthSketch = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowSketch = fmt.Errorf("proto: integer overflow")
|
|
)
|
|
|