mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-11 22:07:27 -08:00
add prompb changes
Signed-off-by: Callum Styan <callumstyan@gmail.com>
This commit is contained in:
parent
cbdb96fbd8
commit
2f09f8cd62
1939
prompb/github.com/prometheus/prometheus/prompb/remote_vtproto.pb.go
Normal file
1939
prompb/github.com/prometheus/prometheus/prompb/remote_vtproto.pb.go
Normal file
File diff suppressed because it is too large
Load diff
5167
prompb/github.com/prometheus/prometheus/prompb/types_vtproto.pb.go
Normal file
5167
prompb/github.com/prometheus/prometheus/prompb/types_vtproto.pb.go
Normal file
File diff suppressed because it is too large
Load diff
|
@ -6,8 +6,10 @@ package prompb
|
|||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "google.golang.org/protobuf/proto"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
io "io"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -17,6 +19,242 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
func (this *WriteRequest) EqualVT(that *WriteRequest) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if len(this.Timeseries) != len(that.Timeseries) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Timeseries {
|
||||
vy := that.Timeseries[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &TimeSeries{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &TimeSeries{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(this.Metadata) != len(that.Metadata) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Metadata {
|
||||
vy := that.Metadata[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &MetricMetadata{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &MetricMetadata{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *WriteRequest) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*WriteRequest)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *ReadRequest) EqualVT(that *ReadRequest) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if len(this.Queries) != len(that.Queries) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Queries {
|
||||
vy := that.Queries[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &Query{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &Query{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(this.AcceptedResponseTypes) != len(that.AcceptedResponseTypes) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.AcceptedResponseTypes {
|
||||
vy := that.AcceptedResponseTypes[i]
|
||||
if vx != vy {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *ReadRequest) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*ReadRequest)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *ReadResponse) EqualVT(that *ReadResponse) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if len(this.Results) != len(that.Results) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Results {
|
||||
vy := that.Results[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &QueryResult{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &QueryResult{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *ReadResponse) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*ReadResponse)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *Query) EqualVT(that *Query) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if this.StartTimestampMs != that.StartTimestampMs {
|
||||
return false
|
||||
}
|
||||
if this.EndTimestampMs != that.EndTimestampMs {
|
||||
return false
|
||||
}
|
||||
if len(this.Matchers) != len(that.Matchers) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Matchers {
|
||||
vy := that.Matchers[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &LabelMatcher{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &LabelMatcher{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if !this.Hints.EqualVT(that.Hints) {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *Query) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*Query)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *QueryResult) EqualVT(that *QueryResult) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if len(this.Timeseries) != len(that.Timeseries) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Timeseries {
|
||||
vy := that.Timeseries[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &TimeSeries{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &TimeSeries{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *QueryResult) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*QueryResult)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *ChunkedReadResponse) EqualVT(that *ChunkedReadResponse) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if len(this.ChunkedSeries) != len(that.ChunkedSeries) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.ChunkedSeries {
|
||||
vy := that.ChunkedSeries[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &ChunkedSeries{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &ChunkedSeries{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if this.QueryIndex != that.QueryIndex {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *ChunkedReadResponse) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*ChunkedReadResponse)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (m *WriteRequest) MarshalVT() (dAtA []byte, err error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
|
@ -345,6 +583,34 @@ func (m *ChunkedReadResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
|||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
var vtprotoPool_WriteRequest = sync.Pool{
|
||||
New: func() interface{} {
|
||||
return &WriteRequest{}
|
||||
},
|
||||
}
|
||||
|
||||
func (m *WriteRequest) ResetVT() {
|
||||
for _, mm := range m.Timeseries {
|
||||
mm.ResetVT()
|
||||
}
|
||||
f0 := m.Timeseries[:0]
|
||||
for _, mm := range m.Metadata {
|
||||
mm.Reset()
|
||||
}
|
||||
f1 := m.Metadata[:0]
|
||||
m.Reset()
|
||||
m.Timeseries = f0
|
||||
m.Metadata = f1
|
||||
}
|
||||
func (m *WriteRequest) ReturnToVTPool() {
|
||||
if m != nil {
|
||||
m.ResetVT()
|
||||
vtprotoPool_WriteRequest.Put(m)
|
||||
}
|
||||
}
|
||||
func WriteRequestFromVTPool() *WriteRequest {
|
||||
return vtprotoPool_WriteRequest.Get().(*WriteRequest)
|
||||
}
|
||||
func (m *WriteRequest) SizeVT() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
|
@ -525,7 +791,14 @@ func (m *WriteRequest) UnmarshalVT(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Timeseries = append(m.Timeseries, &TimeSeries{})
|
||||
if len(m.Timeseries) == cap(m.Timeseries) {
|
||||
m.Timeseries = append(m.Timeseries, &TimeSeries{})
|
||||
} else {
|
||||
m.Timeseries = m.Timeseries[:len(m.Timeseries)+1]
|
||||
if m.Timeseries[len(m.Timeseries)-1] == nil {
|
||||
m.Timeseries[len(m.Timeseries)-1] = &TimeSeries{}
|
||||
}
|
||||
}
|
||||
if err := m.Timeseries[len(m.Timeseries)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -559,7 +832,14 @@ func (m *WriteRequest) UnmarshalVT(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Metadata = append(m.Metadata, &MetricMetadata{})
|
||||
if len(m.Metadata) == cap(m.Metadata) {
|
||||
m.Metadata = append(m.Metadata, &MetricMetadata{})
|
||||
} else {
|
||||
m.Metadata = m.Metadata[:len(m.Metadata)+1]
|
||||
if m.Metadata[len(m.Metadata)-1] == nil {
|
||||
m.Metadata[len(m.Metadata)-1] = &MetricMetadata{}
|
||||
}
|
||||
}
|
||||
if err := m.Metadata[len(m.Metadata)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -7,10 +7,12 @@ package prompb
|
|||
import (
|
||||
binary "encoding/binary"
|
||||
fmt "fmt"
|
||||
proto "google.golang.org/protobuf/proto"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
io "io"
|
||||
math "math"
|
||||
bits "math/bits"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -20,6 +22,593 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
func (this *MetricMetadata) EqualVT(that *MetricMetadata) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if this.Type != that.Type {
|
||||
return false
|
||||
}
|
||||
if this.MetricFamilyName != that.MetricFamilyName {
|
||||
return false
|
||||
}
|
||||
if this.Help != that.Help {
|
||||
return false
|
||||
}
|
||||
if this.Unit != that.Unit {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *MetricMetadata) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*MetricMetadata)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *Sample) EqualVT(that *Sample) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if this.Value != that.Value {
|
||||
return false
|
||||
}
|
||||
if this.Timestamp != that.Timestamp {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *Sample) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*Sample)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *Exemplar) EqualVT(that *Exemplar) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if len(this.Labels) != len(that.Labels) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Labels {
|
||||
vy := that.Labels[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &Label{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &Label{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if this.Value != that.Value {
|
||||
return false
|
||||
}
|
||||
if this.Timestamp != that.Timestamp {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *Exemplar) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*Exemplar)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *Histogram) EqualVT(that *Histogram) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if this.Count == nil && that.Count != nil {
|
||||
return false
|
||||
} else if this.Count != nil {
|
||||
if that.Count == nil {
|
||||
return false
|
||||
}
|
||||
if !this.Count.(interface{ EqualVT(isHistogram_Count) bool }).EqualVT(that.Count) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if this.ZeroCount == nil && that.ZeroCount != nil {
|
||||
return false
|
||||
} else if this.ZeroCount != nil {
|
||||
if that.ZeroCount == nil {
|
||||
return false
|
||||
}
|
||||
if !this.ZeroCount.(interface {
|
||||
EqualVT(isHistogram_ZeroCount) bool
|
||||
}).EqualVT(that.ZeroCount) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if this.Sum != that.Sum {
|
||||
return false
|
||||
}
|
||||
if this.Schema != that.Schema {
|
||||
return false
|
||||
}
|
||||
if this.ZeroThreshold != that.ZeroThreshold {
|
||||
return false
|
||||
}
|
||||
if len(this.NegativeSpans) != len(that.NegativeSpans) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.NegativeSpans {
|
||||
vy := that.NegativeSpans[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &BucketSpan{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &BucketSpan{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(this.NegativeDeltas) != len(that.NegativeDeltas) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.NegativeDeltas {
|
||||
vy := that.NegativeDeltas[i]
|
||||
if vx != vy {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if len(this.NegativeCounts) != len(that.NegativeCounts) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.NegativeCounts {
|
||||
vy := that.NegativeCounts[i]
|
||||
if vx != vy {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if len(this.PositiveSpans) != len(that.PositiveSpans) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.PositiveSpans {
|
||||
vy := that.PositiveSpans[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &BucketSpan{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &BucketSpan{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(this.PositiveDeltas) != len(that.PositiveDeltas) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.PositiveDeltas {
|
||||
vy := that.PositiveDeltas[i]
|
||||
if vx != vy {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if len(this.PositiveCounts) != len(that.PositiveCounts) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.PositiveCounts {
|
||||
vy := that.PositiveCounts[i]
|
||||
if vx != vy {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if this.ResetHint != that.ResetHint {
|
||||
return false
|
||||
}
|
||||
if this.Timestamp != that.Timestamp {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *Histogram) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*Histogram)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *Histogram_CountInt) EqualVT(thatIface isHistogram_Count) bool {
|
||||
that, ok := thatIface.(*Histogram_CountInt)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
if this == that {
|
||||
return true
|
||||
}
|
||||
if this == nil && that != nil || this != nil && that == nil {
|
||||
return false
|
||||
}
|
||||
if this.CountInt != that.CountInt {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *Histogram_CountFloat) EqualVT(thatIface isHistogram_Count) bool {
|
||||
that, ok := thatIface.(*Histogram_CountFloat)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
if this == that {
|
||||
return true
|
||||
}
|
||||
if this == nil && that != nil || this != nil && that == nil {
|
||||
return false
|
||||
}
|
||||
if this.CountFloat != that.CountFloat {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *Histogram_ZeroCountInt) EqualVT(thatIface isHistogram_ZeroCount) bool {
|
||||
that, ok := thatIface.(*Histogram_ZeroCountInt)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
if this == that {
|
||||
return true
|
||||
}
|
||||
if this == nil && that != nil || this != nil && that == nil {
|
||||
return false
|
||||
}
|
||||
if this.ZeroCountInt != that.ZeroCountInt {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *Histogram_ZeroCountFloat) EqualVT(thatIface isHistogram_ZeroCount) bool {
|
||||
that, ok := thatIface.(*Histogram_ZeroCountFloat)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
if this == that {
|
||||
return true
|
||||
}
|
||||
if this == nil && that != nil || this != nil && that == nil {
|
||||
return false
|
||||
}
|
||||
if this.ZeroCountFloat != that.ZeroCountFloat {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (this *BucketSpan) EqualVT(that *BucketSpan) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if this.Offset != that.Offset {
|
||||
return false
|
||||
}
|
||||
if this.Length != that.Length {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *BucketSpan) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*BucketSpan)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *TimeSeries) EqualVT(that *TimeSeries) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if len(this.Labels) != len(that.Labels) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Labels {
|
||||
vy := that.Labels[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &Label{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &Label{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(this.Samples) != len(that.Samples) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Samples {
|
||||
vy := that.Samples[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &Sample{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &Sample{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(this.Exemplars) != len(that.Exemplars) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Exemplars {
|
||||
vy := that.Exemplars[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &Exemplar{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &Exemplar{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(this.Histograms) != len(that.Histograms) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Histograms {
|
||||
vy := that.Histograms[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &Histogram{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &Histogram{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *TimeSeries) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*TimeSeries)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *Label) EqualVT(that *Label) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if this.Name != that.Name {
|
||||
return false
|
||||
}
|
||||
if this.Value != that.Value {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *Label) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*Label)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *Labels) EqualVT(that *Labels) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if len(this.Labels) != len(that.Labels) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Labels {
|
||||
vy := that.Labels[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &Label{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &Label{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *Labels) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*Labels)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *LabelMatcher) EqualVT(that *LabelMatcher) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if this.Type != that.Type {
|
||||
return false
|
||||
}
|
||||
if this.Name != that.Name {
|
||||
return false
|
||||
}
|
||||
if this.Value != that.Value {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *LabelMatcher) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*LabelMatcher)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *ReadHints) EqualVT(that *ReadHints) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if this.StepMs != that.StepMs {
|
||||
return false
|
||||
}
|
||||
if this.Func != that.Func {
|
||||
return false
|
||||
}
|
||||
if this.StartMs != that.StartMs {
|
||||
return false
|
||||
}
|
||||
if this.EndMs != that.EndMs {
|
||||
return false
|
||||
}
|
||||
if len(this.Grouping) != len(that.Grouping) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Grouping {
|
||||
vy := that.Grouping[i]
|
||||
if vx != vy {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if this.By != that.By {
|
||||
return false
|
||||
}
|
||||
if this.RangeMs != that.RangeMs {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *ReadHints) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*ReadHints)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *Chunk) EqualVT(that *Chunk) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if this.MinTimeMs != that.MinTimeMs {
|
||||
return false
|
||||
}
|
||||
if this.MaxTimeMs != that.MaxTimeMs {
|
||||
return false
|
||||
}
|
||||
if this.Type != that.Type {
|
||||
return false
|
||||
}
|
||||
if string(this.Data) != string(that.Data) {
|
||||
return false
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *Chunk) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*Chunk)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (this *ChunkedSeries) EqualVT(that *ChunkedSeries) bool {
|
||||
if this == that {
|
||||
return true
|
||||
} else if this == nil || that == nil {
|
||||
return false
|
||||
}
|
||||
if len(this.Labels) != len(that.Labels) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Labels {
|
||||
vy := that.Labels[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &Label{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &Label{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(this.Chunks) != len(that.Chunks) {
|
||||
return false
|
||||
}
|
||||
for i, vx := range this.Chunks {
|
||||
vy := that.Chunks[i]
|
||||
if p, q := vx, vy; p != q {
|
||||
if p == nil {
|
||||
p = &Chunk{}
|
||||
}
|
||||
if q == nil {
|
||||
q = &Chunk{}
|
||||
}
|
||||
if !p.EqualVT(q) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return string(this.unknownFields) == string(that.unknownFields)
|
||||
}
|
||||
|
||||
func (this *ChunkedSeries) EqualMessageVT(thatMsg proto.Message) bool {
|
||||
that, ok := thatMsg.(*ChunkedSeries)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return this.EqualVT(that)
|
||||
}
|
||||
func (m *MetricMetadata) MarshalVT() (dAtA []byte, err error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
|
@ -863,6 +1452,83 @@ func encodeVarint(dAtA []byte, offset int, v uint64) int {
|
|||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
|
||||
var vtprotoPool_Sample = sync.Pool{
|
||||
New: func() interface{} {
|
||||
return &Sample{}
|
||||
},
|
||||
}
|
||||
|
||||
func (m *Sample) ResetVT() {
|
||||
m.Reset()
|
||||
}
|
||||
func (m *Sample) ReturnToVTPool() {
|
||||
if m != nil {
|
||||
m.ResetVT()
|
||||
vtprotoPool_Sample.Put(m)
|
||||
}
|
||||
}
|
||||
func SampleFromVTPool() *Sample {
|
||||
return vtprotoPool_Sample.Get().(*Sample)
|
||||
}
|
||||
|
||||
var vtprotoPool_TimeSeries = sync.Pool{
|
||||
New: func() interface{} {
|
||||
return &TimeSeries{}
|
||||
},
|
||||
}
|
||||
|
||||
func (m *TimeSeries) ResetVT() {
|
||||
for _, mm := range m.Labels {
|
||||
mm.ResetVT()
|
||||
}
|
||||
f0 := m.Labels[:0]
|
||||
for _, mm := range m.Samples {
|
||||
mm.ResetVT()
|
||||
}
|
||||
f1 := m.Samples[:0]
|
||||
for _, mm := range m.Exemplars {
|
||||
mm.Reset()
|
||||
}
|
||||
f2 := m.Exemplars[:0]
|
||||
for _, mm := range m.Histograms {
|
||||
mm.Reset()
|
||||
}
|
||||
f3 := m.Histograms[:0]
|
||||
m.Reset()
|
||||
m.Labels = f0
|
||||
m.Samples = f1
|
||||
m.Exemplars = f2
|
||||
m.Histograms = f3
|
||||
}
|
||||
func (m *TimeSeries) ReturnToVTPool() {
|
||||
if m != nil {
|
||||
m.ResetVT()
|
||||
vtprotoPool_TimeSeries.Put(m)
|
||||
}
|
||||
}
|
||||
func TimeSeriesFromVTPool() *TimeSeries {
|
||||
return vtprotoPool_TimeSeries.Get().(*TimeSeries)
|
||||
}
|
||||
|
||||
var vtprotoPool_Label = sync.Pool{
|
||||
New: func() interface{} {
|
||||
return &Label{}
|
||||
},
|
||||
}
|
||||
|
||||
func (m *Label) ResetVT() {
|
||||
m.Reset()
|
||||
}
|
||||
func (m *Label) ReturnToVTPool() {
|
||||
if m != nil {
|
||||
m.ResetVT()
|
||||
vtprotoPool_Label.Put(m)
|
||||
}
|
||||
}
|
||||
func LabelFromVTPool() *Label {
|
||||
return vtprotoPool_Label.Get().(*Label)
|
||||
}
|
||||
func (m *MetricMetadata) SizeVT() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
|
@ -2253,7 +2919,14 @@ func (m *TimeSeries) UnmarshalVT(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Labels = append(m.Labels, &Label{})
|
||||
if len(m.Labels) == cap(m.Labels) {
|
||||
m.Labels = append(m.Labels, &Label{})
|
||||
} else {
|
||||
m.Labels = m.Labels[:len(m.Labels)+1]
|
||||
if m.Labels[len(m.Labels)-1] == nil {
|
||||
m.Labels[len(m.Labels)-1] = &Label{}
|
||||
}
|
||||
}
|
||||
if err := m.Labels[len(m.Labels)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -2287,7 +2960,14 @@ func (m *TimeSeries) UnmarshalVT(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Samples = append(m.Samples, &Sample{})
|
||||
if len(m.Samples) == cap(m.Samples) {
|
||||
m.Samples = append(m.Samples, &Sample{})
|
||||
} else {
|
||||
m.Samples = m.Samples[:len(m.Samples)+1]
|
||||
if m.Samples[len(m.Samples)-1] == nil {
|
||||
m.Samples[len(m.Samples)-1] = &Sample{}
|
||||
}
|
||||
}
|
||||
if err := m.Samples[len(m.Samples)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -2321,7 +3001,14 @@ func (m *TimeSeries) UnmarshalVT(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Exemplars = append(m.Exemplars, &Exemplar{})
|
||||
if len(m.Exemplars) == cap(m.Exemplars) {
|
||||
m.Exemplars = append(m.Exemplars, &Exemplar{})
|
||||
} else {
|
||||
m.Exemplars = m.Exemplars[:len(m.Exemplars)+1]
|
||||
if m.Exemplars[len(m.Exemplars)-1] == nil {
|
||||
m.Exemplars[len(m.Exemplars)-1] = &Exemplar{}
|
||||
}
|
||||
}
|
||||
if err := m.Exemplars[len(m.Exemplars)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -2355,7 +3042,14 @@ func (m *TimeSeries) UnmarshalVT(dAtA []byte) error {
|
|||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Histograms = append(m.Histograms, &Histogram{})
|
||||
if len(m.Histograms) == cap(m.Histograms) {
|
||||
m.Histograms = append(m.Histograms, &Histogram{})
|
||||
} else {
|
||||
m.Histograms = m.Histograms[:len(m.Histograms)+1]
|
||||
if m.Histograms[len(m.Histograms)-1] == nil {
|
||||
m.Histograms[len(m.Histograms)-1] = &Histogram{}
|
||||
}
|
||||
}
|
||||
if err := m.Histograms[len(m.Histograms)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue