github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/roachpb/internal.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: roachpb/internal.proto
     3  
     4  package roachpb
     5  
     6  import proto "github.com/gogo/protobuf/proto"
     7  import fmt "fmt"
     8  import math "math"
     9  
    10  import encoding_binary "encoding/binary"
    11  
    12  import io "io"
    13  
    14  // Reference imports to suppress errors if they are not otherwise used.
    15  var _ = proto.Marshal
    16  var _ = fmt.Errorf
    17  var _ = math.Inf
    18  
    19  // This is a compile-time assertion to ensure that this generated file
    20  // is compatible with the proto package it is being compiled against.
    21  // A compilation error at this line likely means your copy of the
    22  // proto package needs to be updated.
    23  const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
    24  
    25  // InternalTimeSeriesData is a collection of data samples for some
    26  // measurable value, where each sample is taken over a uniform time
    27  // interval.
    28  //
    29  // The collection itself contains a start timestamp (in seconds since the unix
    30  // epoch) and a sample duration (in milliseconds). Each sample in the collection
    31  // will contain a positive integer offset that indicates the length of time
    32  // between the start_timestamp of the collection and the time when the sample
    33  // began, expressed as an whole number of sample intervals. For example, if the
    34  // sample duration is 60000 (indicating 1 minute), then a contained sample with
    35  // an offset value of 5 begins (5*60000ms = 300000ms = 5 minutes) after the
    36  // start timestamp of this data.
    37  //
    38  // This is meant to be an efficient internal representation of time series data,
    39  // ensuring that very little redundant data is stored on disk. With this goal in
    40  // mind, this message does not identify the variable which is actually being
    41  // measured; that information is expected be encoded in the key where this
    42  // message is stored.
    43  //
    44  // The actual samples can be stored in one of two formats: a Row-based format in
    45  // the "samples" repeated field, or a columnar format spread across several
    46  // different repeated columns. The row-based format will eventually be
    47  // deprecated, but is maintained for backwards compatibility. There is no flag
    48  // that indicates whether the data is stored as rows or columns; columnar data
    49  // is indicated by the presence of a non-zero-length "offset" collection, while
    50  // row data is indicated by a non-zero-length "samples" collection. Each data
    51  // message must have all of its data either row format or column format.
    52  //
    53  // One feature of the columnar layout is that it is "sparse", and columns
    54  // without useful information are elided. Specifically, the "offset" and "last"
    55  // columns will always be populated, but the other columns are only populated
    56  // for resolutions which contain detailed "rollup" information about long sample
    57  // periods. In the case of non-rollup data there is only one measurement per
    58  // sample period, and the value of all optional columns can be directly inferred
    59  // from the "last" column. Eliding those columns represents a significant memory
    60  // and on-disk savings for our highest resolution data.
    61  type InternalTimeSeriesData struct {
    62  	// Holds a wall time, expressed as a unix epoch time in nanoseconds. This
    63  	// represents the earliest possible timestamp for a sample within the
    64  	// collection.
    65  	StartTimestampNanos int64 `protobuf:"varint,1,opt,name=start_timestamp_nanos,json=startTimestampNanos" json:"start_timestamp_nanos"`
    66  	// The duration of each sample interval, expressed in nanoseconds.
    67  	SampleDurationNanos int64 `protobuf:"varint,2,opt,name=sample_duration_nanos,json=sampleDurationNanos" json:"sample_duration_nanos"`
    68  	// The data samples for this metric if this data was written in the old
    69  	// row format.
    70  	Samples []InternalTimeSeriesSample `protobuf:"bytes,3,rep,name=samples" json:"samples"` // Deprecated: Do not use.
    71  	// Columnar array containing the ordered offsets of the samples in this
    72  	// data set.
    73  	Offset []int32 `protobuf:"varint,4,rep,packed,name=offset" json:"offset,omitempty"`
    74  	// Columnar array containing the last value of the samples in this data set;
    75  	// the "last" value is the most recent individual measurement during a sample
    76  	// period.
    77  	Last []float64 `protobuf:"fixed64,5,rep,packed,name=last" json:"last,omitempty"`
    78  	// Columnar array containing the total number of measurements that were taken
    79  	// during this sample period.
    80  	Count []uint32 `protobuf:"varint,6,rep,packed,name=count" json:"count,omitempty"`
    81  	// Columnar array containing the sum of measurements that were taken during
    82  	// this sample period. If this column is elided, its value for all samples is
    83  	// 1.
    84  	Sum []float64 `protobuf:"fixed64,7,rep,packed,name=sum" json:"sum,omitempty"`
    85  	// Columnar array containing the maximum value of any single measurement taken
    86  	// during this sample period. If this column is elided, its value for all
    87  	// samples is equal to "last".
    88  	Max []float64 `protobuf:"fixed64,8,rep,packed,name=max" json:"max,omitempty"`
    89  	// Columnar array containing the minimum value of any single measurements
    90  	// taken during this sample period. If this column is elided, its value for
    91  	// all samples is equal to "last".
    92  	Min []float64 `protobuf:"fixed64,9,rep,packed,name=min" json:"min,omitempty"`
    93  	// Columnar array containing the first value of the samples in this data set;
    94  	// the "first" value is the earliest individual measurement during a sample
    95  	// period. If this column is elided, its value for all samples is equal to
    96  	// "last".
    97  	First []float64 `protobuf:"fixed64,10,rep,packed,name=first" json:"first,omitempty"`
    98  	// Columnar array containing the variance of measurements that were taken
    99  	// during this sample period. If this column is elided, its value for all
   100  	// samples is zero.
   101  	Variance []float64 `protobuf:"fixed64,11,rep,packed,name=variance" json:"variance,omitempty"`
   102  }
   103  
   104  func (m *InternalTimeSeriesData) Reset()         { *m = InternalTimeSeriesData{} }
   105  func (m *InternalTimeSeriesData) String() string { return proto.CompactTextString(m) }
   106  func (*InternalTimeSeriesData) ProtoMessage()    {}
   107  func (*InternalTimeSeriesData) Descriptor() ([]byte, []int) {
   108  	return fileDescriptor_internal_10ecd69bc61e348f, []int{0}
   109  }
   110  func (m *InternalTimeSeriesData) XXX_Unmarshal(b []byte) error {
   111  	return m.Unmarshal(b)
   112  }
   113  func (m *InternalTimeSeriesData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   114  	b = b[:cap(b)]
   115  	n, err := m.MarshalTo(b)
   116  	if err != nil {
   117  		return nil, err
   118  	}
   119  	return b[:n], nil
   120  }
   121  func (dst *InternalTimeSeriesData) XXX_Merge(src proto.Message) {
   122  	xxx_messageInfo_InternalTimeSeriesData.Merge(dst, src)
   123  }
   124  func (m *InternalTimeSeriesData) XXX_Size() int {
   125  	return m.Size()
   126  }
   127  func (m *InternalTimeSeriesData) XXX_DiscardUnknown() {
   128  	xxx_messageInfo_InternalTimeSeriesData.DiscardUnknown(m)
   129  }
   130  
   131  var xxx_messageInfo_InternalTimeSeriesData proto.InternalMessageInfo
   132  
   133  // A InternalTimeSeriesSample represents data gathered from multiple
   134  // measurements of a variable value over a given period of time. The
   135  // length of that period of time is stored in an
   136  // InternalTimeSeriesData message; a sample cannot be interpreted
   137  // correctly without a start timestamp and sample duration.
   138  //
   139  // Each sample may contain data gathered from multiple measurements of the same
   140  // variable, as long as all of those measurements occurred within the sample
   141  // period. The sample stores several aggregated values from these measurements:
   142  // - The sum of all measured values
   143  // - A count of all measurements taken
   144  // - The maximum individual measurement seen
   145  // - The minimum individual measurement seen
   146  //
   147  // If zero measurements are present in a sample, then it should be omitted
   148  // entirely from any collection it would be a part of.
   149  //
   150  // If the count of measurements is 1, then max and min fields may be omitted
   151  // and assumed equal to the sum field.
   152  type InternalTimeSeriesSample struct {
   153  	// Temporal offset from the "start_timestamp" of the InternalTimeSeriesData
   154  	// collection this data point is part in. The units of this value are
   155  	// determined by the value of the "sample_duration_milliseconds" field of
   156  	// the TimeSeriesData collection.
   157  	Offset int32 `protobuf:"varint,1,opt,name=offset" json:"offset"`
   158  	// Sum of all measurements.
   159  	Sum float64 `protobuf:"fixed64,7,opt,name=sum" json:"sum"`
   160  	// Count of measurements taken within this sample.
   161  	Count uint32 `protobuf:"varint,6,opt,name=count" json:"count"`
   162  	// Maximum encountered measurement in this sample.
   163  	Max *float64 `protobuf:"fixed64,8,opt,name=max" json:"max,omitempty"`
   164  	// Minimum encountered measurement in this sample.
   165  	Min *float64 `protobuf:"fixed64,9,opt,name=min" json:"min,omitempty"`
   166  }
   167  
   168  func (m *InternalTimeSeriesSample) Reset()         { *m = InternalTimeSeriesSample{} }
   169  func (m *InternalTimeSeriesSample) String() string { return proto.CompactTextString(m) }
   170  func (*InternalTimeSeriesSample) ProtoMessage()    {}
   171  func (*InternalTimeSeriesSample) Descriptor() ([]byte, []int) {
   172  	return fileDescriptor_internal_10ecd69bc61e348f, []int{1}
   173  }
   174  func (m *InternalTimeSeriesSample) XXX_Unmarshal(b []byte) error {
   175  	return m.Unmarshal(b)
   176  }
   177  func (m *InternalTimeSeriesSample) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   178  	b = b[:cap(b)]
   179  	n, err := m.MarshalTo(b)
   180  	if err != nil {
   181  		return nil, err
   182  	}
   183  	return b[:n], nil
   184  }
   185  func (dst *InternalTimeSeriesSample) XXX_Merge(src proto.Message) {
   186  	xxx_messageInfo_InternalTimeSeriesSample.Merge(dst, src)
   187  }
   188  func (m *InternalTimeSeriesSample) XXX_Size() int {
   189  	return m.Size()
   190  }
   191  func (m *InternalTimeSeriesSample) XXX_DiscardUnknown() {
   192  	xxx_messageInfo_InternalTimeSeriesSample.DiscardUnknown(m)
   193  }
   194  
   195  var xxx_messageInfo_InternalTimeSeriesSample proto.InternalMessageInfo
   196  
   197  func init() {
   198  	proto.RegisterType((*InternalTimeSeriesData)(nil), "cockroach.roachpb.InternalTimeSeriesData")
   199  	proto.RegisterType((*InternalTimeSeriesSample)(nil), "cockroach.roachpb.InternalTimeSeriesSample")
   200  }
   201  func (m *InternalTimeSeriesData) Marshal() (dAtA []byte, err error) {
   202  	size := m.Size()
   203  	dAtA = make([]byte, size)
   204  	n, err := m.MarshalTo(dAtA)
   205  	if err != nil {
   206  		return nil, err
   207  	}
   208  	return dAtA[:n], nil
   209  }
   210  
   211  func (m *InternalTimeSeriesData) MarshalTo(dAtA []byte) (int, error) {
   212  	var i int
   213  	_ = i
   214  	var l int
   215  	_ = l
   216  	dAtA[i] = 0x8
   217  	i++
   218  	i = encodeVarintInternal(dAtA, i, uint64(m.StartTimestampNanos))
   219  	dAtA[i] = 0x10
   220  	i++
   221  	i = encodeVarintInternal(dAtA, i, uint64(m.SampleDurationNanos))
   222  	if len(m.Samples) > 0 {
   223  		for _, msg := range m.Samples {
   224  			dAtA[i] = 0x1a
   225  			i++
   226  			i = encodeVarintInternal(dAtA, i, uint64(msg.Size()))
   227  			n, err := msg.MarshalTo(dAtA[i:])
   228  			if err != nil {
   229  				return 0, err
   230  			}
   231  			i += n
   232  		}
   233  	}
   234  	if len(m.Offset) > 0 {
   235  		dAtA2 := make([]byte, len(m.Offset)*10)
   236  		var j1 int
   237  		for _, num1 := range m.Offset {
   238  			num := uint64(num1)
   239  			for num >= 1<<7 {
   240  				dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
   241  				num >>= 7
   242  				j1++
   243  			}
   244  			dAtA2[j1] = uint8(num)
   245  			j1++
   246  		}
   247  		dAtA[i] = 0x22
   248  		i++
   249  		i = encodeVarintInternal(dAtA, i, uint64(j1))
   250  		i += copy(dAtA[i:], dAtA2[:j1])
   251  	}
   252  	if len(m.Last) > 0 {
   253  		dAtA[i] = 0x2a
   254  		i++
   255  		i = encodeVarintInternal(dAtA, i, uint64(len(m.Last)*8))
   256  		for _, num := range m.Last {
   257  			f3 := math.Float64bits(float64(num))
   258  			encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f3))
   259  			i += 8
   260  		}
   261  	}
   262  	if len(m.Count) > 0 {
   263  		dAtA5 := make([]byte, len(m.Count)*10)
   264  		var j4 int
   265  		for _, num := range m.Count {
   266  			for num >= 1<<7 {
   267  				dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80)
   268  				num >>= 7
   269  				j4++
   270  			}
   271  			dAtA5[j4] = uint8(num)
   272  			j4++
   273  		}
   274  		dAtA[i] = 0x32
   275  		i++
   276  		i = encodeVarintInternal(dAtA, i, uint64(j4))
   277  		i += copy(dAtA[i:], dAtA5[:j4])
   278  	}
   279  	if len(m.Sum) > 0 {
   280  		dAtA[i] = 0x3a
   281  		i++
   282  		i = encodeVarintInternal(dAtA, i, uint64(len(m.Sum)*8))
   283  		for _, num := range m.Sum {
   284  			f6 := math.Float64bits(float64(num))
   285  			encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f6))
   286  			i += 8
   287  		}
   288  	}
   289  	if len(m.Max) > 0 {
   290  		dAtA[i] = 0x42
   291  		i++
   292  		i = encodeVarintInternal(dAtA, i, uint64(len(m.Max)*8))
   293  		for _, num := range m.Max {
   294  			f7 := math.Float64bits(float64(num))
   295  			encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f7))
   296  			i += 8
   297  		}
   298  	}
   299  	if len(m.Min) > 0 {
   300  		dAtA[i] = 0x4a
   301  		i++
   302  		i = encodeVarintInternal(dAtA, i, uint64(len(m.Min)*8))
   303  		for _, num := range m.Min {
   304  			f8 := math.Float64bits(float64(num))
   305  			encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f8))
   306  			i += 8
   307  		}
   308  	}
   309  	if len(m.First) > 0 {
   310  		dAtA[i] = 0x52
   311  		i++
   312  		i = encodeVarintInternal(dAtA, i, uint64(len(m.First)*8))
   313  		for _, num := range m.First {
   314  			f9 := math.Float64bits(float64(num))
   315  			encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f9))
   316  			i += 8
   317  		}
   318  	}
   319  	if len(m.Variance) > 0 {
   320  		dAtA[i] = 0x5a
   321  		i++
   322  		i = encodeVarintInternal(dAtA, i, uint64(len(m.Variance)*8))
   323  		for _, num := range m.Variance {
   324  			f10 := math.Float64bits(float64(num))
   325  			encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f10))
   326  			i += 8
   327  		}
   328  	}
   329  	return i, nil
   330  }
   331  
   332  func (m *InternalTimeSeriesSample) Marshal() (dAtA []byte, err error) {
   333  	size := m.Size()
   334  	dAtA = make([]byte, size)
   335  	n, err := m.MarshalTo(dAtA)
   336  	if err != nil {
   337  		return nil, err
   338  	}
   339  	return dAtA[:n], nil
   340  }
   341  
   342  func (m *InternalTimeSeriesSample) MarshalTo(dAtA []byte) (int, error) {
   343  	var i int
   344  	_ = i
   345  	var l int
   346  	_ = l
   347  	dAtA[i] = 0x8
   348  	i++
   349  	i = encodeVarintInternal(dAtA, i, uint64(m.Offset))
   350  	dAtA[i] = 0x30
   351  	i++
   352  	i = encodeVarintInternal(dAtA, i, uint64(m.Count))
   353  	dAtA[i] = 0x39
   354  	i++
   355  	encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum))))
   356  	i += 8
   357  	if m.Max != nil {
   358  		dAtA[i] = 0x41
   359  		i++
   360  		encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Max))))
   361  		i += 8
   362  	}
   363  	if m.Min != nil {
   364  		dAtA[i] = 0x49
   365  		i++
   366  		encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Min))))
   367  		i += 8
   368  	}
   369  	return i, nil
   370  }
   371  
   372  func encodeVarintInternal(dAtA []byte, offset int, v uint64) int {
   373  	for v >= 1<<7 {
   374  		dAtA[offset] = uint8(v&0x7f | 0x80)
   375  		v >>= 7
   376  		offset++
   377  	}
   378  	dAtA[offset] = uint8(v)
   379  	return offset + 1
   380  }
   381  func NewPopulatedInternalTimeSeriesData(r randyInternal, easy bool) *InternalTimeSeriesData {
   382  	this := &InternalTimeSeriesData{}
   383  	this.StartTimestampNanos = int64(r.Int63())
   384  	if r.Intn(2) == 0 {
   385  		this.StartTimestampNanos *= -1
   386  	}
   387  	this.SampleDurationNanos = int64(r.Int63())
   388  	if r.Intn(2) == 0 {
   389  		this.SampleDurationNanos *= -1
   390  	}
   391  	if r.Intn(10) != 0 {
   392  		v1 := r.Intn(5)
   393  		this.Samples = make([]InternalTimeSeriesSample, v1)
   394  		for i := 0; i < v1; i++ {
   395  			v2 := NewPopulatedInternalTimeSeriesSample(r, easy)
   396  			this.Samples[i] = *v2
   397  		}
   398  	}
   399  	if r.Intn(10) != 0 {
   400  		v3 := r.Intn(10)
   401  		this.Offset = make([]int32, v3)
   402  		for i := 0; i < v3; i++ {
   403  			this.Offset[i] = int32(r.Int31())
   404  			if r.Intn(2) == 0 {
   405  				this.Offset[i] *= -1
   406  			}
   407  		}
   408  	}
   409  	if r.Intn(10) != 0 {
   410  		v4 := r.Intn(10)
   411  		this.Last = make([]float64, v4)
   412  		for i := 0; i < v4; i++ {
   413  			this.Last[i] = float64(r.Float64())
   414  			if r.Intn(2) == 0 {
   415  				this.Last[i] *= -1
   416  			}
   417  		}
   418  	}
   419  	if r.Intn(10) != 0 {
   420  		v5 := r.Intn(10)
   421  		this.Count = make([]uint32, v5)
   422  		for i := 0; i < v5; i++ {
   423  			this.Count[i] = uint32(r.Uint32())
   424  		}
   425  	}
   426  	if r.Intn(10) != 0 {
   427  		v6 := r.Intn(10)
   428  		this.Sum = make([]float64, v6)
   429  		for i := 0; i < v6; i++ {
   430  			this.Sum[i] = float64(r.Float64())
   431  			if r.Intn(2) == 0 {
   432  				this.Sum[i] *= -1
   433  			}
   434  		}
   435  	}
   436  	if r.Intn(10) != 0 {
   437  		v7 := r.Intn(10)
   438  		this.Max = make([]float64, v7)
   439  		for i := 0; i < v7; i++ {
   440  			this.Max[i] = float64(r.Float64())
   441  			if r.Intn(2) == 0 {
   442  				this.Max[i] *= -1
   443  			}
   444  		}
   445  	}
   446  	if r.Intn(10) != 0 {
   447  		v8 := r.Intn(10)
   448  		this.Min = make([]float64, v8)
   449  		for i := 0; i < v8; i++ {
   450  			this.Min[i] = float64(r.Float64())
   451  			if r.Intn(2) == 0 {
   452  				this.Min[i] *= -1
   453  			}
   454  		}
   455  	}
   456  	if r.Intn(10) != 0 {
   457  		v9 := r.Intn(10)
   458  		this.First = make([]float64, v9)
   459  		for i := 0; i < v9; i++ {
   460  			this.First[i] = float64(r.Float64())
   461  			if r.Intn(2) == 0 {
   462  				this.First[i] *= -1
   463  			}
   464  		}
   465  	}
   466  	if r.Intn(10) != 0 {
   467  		v10 := r.Intn(10)
   468  		this.Variance = make([]float64, v10)
   469  		for i := 0; i < v10; i++ {
   470  			this.Variance[i] = float64(r.Float64())
   471  			if r.Intn(2) == 0 {
   472  				this.Variance[i] *= -1
   473  			}
   474  		}
   475  	}
   476  	if !easy && r.Intn(10) != 0 {
   477  	}
   478  	return this
   479  }
   480  
   481  func NewPopulatedInternalTimeSeriesSample(r randyInternal, easy bool) *InternalTimeSeriesSample {
   482  	this := &InternalTimeSeriesSample{}
   483  	this.Offset = int32(r.Int31())
   484  	if r.Intn(2) == 0 {
   485  		this.Offset *= -1
   486  	}
   487  	this.Count = uint32(r.Uint32())
   488  	this.Sum = float64(r.Float64())
   489  	if r.Intn(2) == 0 {
   490  		this.Sum *= -1
   491  	}
   492  	if r.Intn(10) != 0 {
   493  		v11 := float64(r.Float64())
   494  		if r.Intn(2) == 0 {
   495  			v11 *= -1
   496  		}
   497  		this.Max = &v11
   498  	}
   499  	if r.Intn(10) != 0 {
   500  		v12 := float64(r.Float64())
   501  		if r.Intn(2) == 0 {
   502  			v12 *= -1
   503  		}
   504  		this.Min = &v12
   505  	}
   506  	if !easy && r.Intn(10) != 0 {
   507  	}
   508  	return this
   509  }
   510  
   511  type randyInternal interface {
   512  	Float32() float32
   513  	Float64() float64
   514  	Int63() int64
   515  	Int31() int32
   516  	Uint32() uint32
   517  	Intn(n int) int
   518  }
   519  
   520  func randUTF8RuneInternal(r randyInternal) rune {
   521  	ru := r.Intn(62)
   522  	if ru < 10 {
   523  		return rune(ru + 48)
   524  	} else if ru < 36 {
   525  		return rune(ru + 55)
   526  	}
   527  	return rune(ru + 61)
   528  }
   529  func randStringInternal(r randyInternal) string {
   530  	v13 := r.Intn(100)
   531  	tmps := make([]rune, v13)
   532  	for i := 0; i < v13; i++ {
   533  		tmps[i] = randUTF8RuneInternal(r)
   534  	}
   535  	return string(tmps)
   536  }
   537  func randUnrecognizedInternal(r randyInternal, maxFieldNumber int) (dAtA []byte) {
   538  	l := r.Intn(5)
   539  	for i := 0; i < l; i++ {
   540  		wire := r.Intn(4)
   541  		if wire == 3 {
   542  			wire = 5
   543  		}
   544  		fieldNumber := maxFieldNumber + r.Intn(100)
   545  		dAtA = randFieldInternal(dAtA, r, fieldNumber, wire)
   546  	}
   547  	return dAtA
   548  }
   549  func randFieldInternal(dAtA []byte, r randyInternal, fieldNumber int, wire int) []byte {
   550  	key := uint32(fieldNumber)<<3 | uint32(wire)
   551  	switch wire {
   552  	case 0:
   553  		dAtA = encodeVarintPopulateInternal(dAtA, uint64(key))
   554  		v14 := r.Int63()
   555  		if r.Intn(2) == 0 {
   556  			v14 *= -1
   557  		}
   558  		dAtA = encodeVarintPopulateInternal(dAtA, uint64(v14))
   559  	case 1:
   560  		dAtA = encodeVarintPopulateInternal(dAtA, uint64(key))
   561  		dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
   562  	case 2:
   563  		dAtA = encodeVarintPopulateInternal(dAtA, uint64(key))
   564  		ll := r.Intn(100)
   565  		dAtA = encodeVarintPopulateInternal(dAtA, uint64(ll))
   566  		for j := 0; j < ll; j++ {
   567  			dAtA = append(dAtA, byte(r.Intn(256)))
   568  		}
   569  	default:
   570  		dAtA = encodeVarintPopulateInternal(dAtA, uint64(key))
   571  		dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
   572  	}
   573  	return dAtA
   574  }
   575  func encodeVarintPopulateInternal(dAtA []byte, v uint64) []byte {
   576  	for v >= 1<<7 {
   577  		dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
   578  		v >>= 7
   579  	}
   580  	dAtA = append(dAtA, uint8(v))
   581  	return dAtA
   582  }
   583  func (m *InternalTimeSeriesData) Size() (n int) {
   584  	if m == nil {
   585  		return 0
   586  	}
   587  	var l int
   588  	_ = l
   589  	n += 1 + sovInternal(uint64(m.StartTimestampNanos))
   590  	n += 1 + sovInternal(uint64(m.SampleDurationNanos))
   591  	if len(m.Samples) > 0 {
   592  		for _, e := range m.Samples {
   593  			l = e.Size()
   594  			n += 1 + l + sovInternal(uint64(l))
   595  		}
   596  	}
   597  	if len(m.Offset) > 0 {
   598  		l = 0
   599  		for _, e := range m.Offset {
   600  			l += sovInternal(uint64(e))
   601  		}
   602  		n += 1 + sovInternal(uint64(l)) + l
   603  	}
   604  	if len(m.Last) > 0 {
   605  		n += 1 + sovInternal(uint64(len(m.Last)*8)) + len(m.Last)*8
   606  	}
   607  	if len(m.Count) > 0 {
   608  		l = 0
   609  		for _, e := range m.Count {
   610  			l += sovInternal(uint64(e))
   611  		}
   612  		n += 1 + sovInternal(uint64(l)) + l
   613  	}
   614  	if len(m.Sum) > 0 {
   615  		n += 1 + sovInternal(uint64(len(m.Sum)*8)) + len(m.Sum)*8
   616  	}
   617  	if len(m.Max) > 0 {
   618  		n += 1 + sovInternal(uint64(len(m.Max)*8)) + len(m.Max)*8
   619  	}
   620  	if len(m.Min) > 0 {
   621  		n += 1 + sovInternal(uint64(len(m.Min)*8)) + len(m.Min)*8
   622  	}
   623  	if len(m.First) > 0 {
   624  		n += 1 + sovInternal(uint64(len(m.First)*8)) + len(m.First)*8
   625  	}
   626  	if len(m.Variance) > 0 {
   627  		n += 1 + sovInternal(uint64(len(m.Variance)*8)) + len(m.Variance)*8
   628  	}
   629  	return n
   630  }
   631  
   632  func (m *InternalTimeSeriesSample) Size() (n int) {
   633  	if m == nil {
   634  		return 0
   635  	}
   636  	var l int
   637  	_ = l
   638  	n += 1 + sovInternal(uint64(m.Offset))
   639  	n += 1 + sovInternal(uint64(m.Count))
   640  	n += 9
   641  	if m.Max != nil {
   642  		n += 9
   643  	}
   644  	if m.Min != nil {
   645  		n += 9
   646  	}
   647  	return n
   648  }
   649  
   650  func sovInternal(x uint64) (n int) {
   651  	for {
   652  		n++
   653  		x >>= 7
   654  		if x == 0 {
   655  			break
   656  		}
   657  	}
   658  	return n
   659  }
   660  func sozInternal(x uint64) (n int) {
   661  	return sovInternal(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   662  }
   663  func (m *InternalTimeSeriesData) Unmarshal(dAtA []byte) error {
   664  	l := len(dAtA)
   665  	iNdEx := 0
   666  	for iNdEx < l {
   667  		preIndex := iNdEx
   668  		var wire uint64
   669  		for shift := uint(0); ; shift += 7 {
   670  			if shift >= 64 {
   671  				return ErrIntOverflowInternal
   672  			}
   673  			if iNdEx >= l {
   674  				return io.ErrUnexpectedEOF
   675  			}
   676  			b := dAtA[iNdEx]
   677  			iNdEx++
   678  			wire |= (uint64(b) & 0x7F) << shift
   679  			if b < 0x80 {
   680  				break
   681  			}
   682  		}
   683  		fieldNum := int32(wire >> 3)
   684  		wireType := int(wire & 0x7)
   685  		if wireType == 4 {
   686  			return fmt.Errorf("proto: InternalTimeSeriesData: wiretype end group for non-group")
   687  		}
   688  		if fieldNum <= 0 {
   689  			return fmt.Errorf("proto: InternalTimeSeriesData: illegal tag %d (wire type %d)", fieldNum, wire)
   690  		}
   691  		switch fieldNum {
   692  		case 1:
   693  			if wireType != 0 {
   694  				return fmt.Errorf("proto: wrong wireType = %d for field StartTimestampNanos", wireType)
   695  			}
   696  			m.StartTimestampNanos = 0
   697  			for shift := uint(0); ; shift += 7 {
   698  				if shift >= 64 {
   699  					return ErrIntOverflowInternal
   700  				}
   701  				if iNdEx >= l {
   702  					return io.ErrUnexpectedEOF
   703  				}
   704  				b := dAtA[iNdEx]
   705  				iNdEx++
   706  				m.StartTimestampNanos |= (int64(b) & 0x7F) << shift
   707  				if b < 0x80 {
   708  					break
   709  				}
   710  			}
   711  		case 2:
   712  			if wireType != 0 {
   713  				return fmt.Errorf("proto: wrong wireType = %d for field SampleDurationNanos", wireType)
   714  			}
   715  			m.SampleDurationNanos = 0
   716  			for shift := uint(0); ; shift += 7 {
   717  				if shift >= 64 {
   718  					return ErrIntOverflowInternal
   719  				}
   720  				if iNdEx >= l {
   721  					return io.ErrUnexpectedEOF
   722  				}
   723  				b := dAtA[iNdEx]
   724  				iNdEx++
   725  				m.SampleDurationNanos |= (int64(b) & 0x7F) << shift
   726  				if b < 0x80 {
   727  					break
   728  				}
   729  			}
   730  		case 3:
   731  			if wireType != 2 {
   732  				return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType)
   733  			}
   734  			var msglen int
   735  			for shift := uint(0); ; shift += 7 {
   736  				if shift >= 64 {
   737  					return ErrIntOverflowInternal
   738  				}
   739  				if iNdEx >= l {
   740  					return io.ErrUnexpectedEOF
   741  				}
   742  				b := dAtA[iNdEx]
   743  				iNdEx++
   744  				msglen |= (int(b) & 0x7F) << shift
   745  				if b < 0x80 {
   746  					break
   747  				}
   748  			}
   749  			if msglen < 0 {
   750  				return ErrInvalidLengthInternal
   751  			}
   752  			postIndex := iNdEx + msglen
   753  			if postIndex > l {
   754  				return io.ErrUnexpectedEOF
   755  			}
   756  			m.Samples = append(m.Samples, InternalTimeSeriesSample{})
   757  			if err := m.Samples[len(m.Samples)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   758  				return err
   759  			}
   760  			iNdEx = postIndex
   761  		case 4:
   762  			if wireType == 0 {
   763  				var v int32
   764  				for shift := uint(0); ; shift += 7 {
   765  					if shift >= 64 {
   766  						return ErrIntOverflowInternal
   767  					}
   768  					if iNdEx >= l {
   769  						return io.ErrUnexpectedEOF
   770  					}
   771  					b := dAtA[iNdEx]
   772  					iNdEx++
   773  					v |= (int32(b) & 0x7F) << shift
   774  					if b < 0x80 {
   775  						break
   776  					}
   777  				}
   778  				m.Offset = append(m.Offset, v)
   779  			} else if wireType == 2 {
   780  				var packedLen int
   781  				for shift := uint(0); ; shift += 7 {
   782  					if shift >= 64 {
   783  						return ErrIntOverflowInternal
   784  					}
   785  					if iNdEx >= l {
   786  						return io.ErrUnexpectedEOF
   787  					}
   788  					b := dAtA[iNdEx]
   789  					iNdEx++
   790  					packedLen |= (int(b) & 0x7F) << shift
   791  					if b < 0x80 {
   792  						break
   793  					}
   794  				}
   795  				if packedLen < 0 {
   796  					return ErrInvalidLengthInternal
   797  				}
   798  				postIndex := iNdEx + packedLen
   799  				if postIndex > l {
   800  					return io.ErrUnexpectedEOF
   801  				}
   802  				var elementCount int
   803  				var count int
   804  				for _, integer := range dAtA {
   805  					if integer < 128 {
   806  						count++
   807  					}
   808  				}
   809  				elementCount = count
   810  				if elementCount != 0 && len(m.Offset) == 0 {
   811  					m.Offset = make([]int32, 0, elementCount)
   812  				}
   813  				for iNdEx < postIndex {
   814  					var v int32
   815  					for shift := uint(0); ; shift += 7 {
   816  						if shift >= 64 {
   817  							return ErrIntOverflowInternal
   818  						}
   819  						if iNdEx >= l {
   820  							return io.ErrUnexpectedEOF
   821  						}
   822  						b := dAtA[iNdEx]
   823  						iNdEx++
   824  						v |= (int32(b) & 0x7F) << shift
   825  						if b < 0x80 {
   826  							break
   827  						}
   828  					}
   829  					m.Offset = append(m.Offset, v)
   830  				}
   831  			} else {
   832  				return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
   833  			}
   834  		case 5:
   835  			if wireType == 1 {
   836  				var v uint64
   837  				if (iNdEx + 8) > l {
   838  					return io.ErrUnexpectedEOF
   839  				}
   840  				v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
   841  				iNdEx += 8
   842  				v2 := float64(math.Float64frombits(v))
   843  				m.Last = append(m.Last, v2)
   844  			} else if wireType == 2 {
   845  				var packedLen int
   846  				for shift := uint(0); ; shift += 7 {
   847  					if shift >= 64 {
   848  						return ErrIntOverflowInternal
   849  					}
   850  					if iNdEx >= l {
   851  						return io.ErrUnexpectedEOF
   852  					}
   853  					b := dAtA[iNdEx]
   854  					iNdEx++
   855  					packedLen |= (int(b) & 0x7F) << shift
   856  					if b < 0x80 {
   857  						break
   858  					}
   859  				}
   860  				if packedLen < 0 {
   861  					return ErrInvalidLengthInternal
   862  				}
   863  				postIndex := iNdEx + packedLen
   864  				if postIndex > l {
   865  					return io.ErrUnexpectedEOF
   866  				}
   867  				var elementCount int
   868  				elementCount = packedLen / 8
   869  				if elementCount != 0 && len(m.Last) == 0 {
   870  					m.Last = make([]float64, 0, elementCount)
   871  				}
   872  				for iNdEx < postIndex {
   873  					var v uint64
   874  					if (iNdEx + 8) > l {
   875  						return io.ErrUnexpectedEOF
   876  					}
   877  					v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
   878  					iNdEx += 8
   879  					v2 := float64(math.Float64frombits(v))
   880  					m.Last = append(m.Last, v2)
   881  				}
   882  			} else {
   883  				return fmt.Errorf("proto: wrong wireType = %d for field Last", wireType)
   884  			}
   885  		case 6:
   886  			if wireType == 0 {
   887  				var v uint32
   888  				for shift := uint(0); ; shift += 7 {
   889  					if shift >= 64 {
   890  						return ErrIntOverflowInternal
   891  					}
   892  					if iNdEx >= l {
   893  						return io.ErrUnexpectedEOF
   894  					}
   895  					b := dAtA[iNdEx]
   896  					iNdEx++
   897  					v |= (uint32(b) & 0x7F) << shift
   898  					if b < 0x80 {
   899  						break
   900  					}
   901  				}
   902  				m.Count = append(m.Count, v)
   903  			} else if wireType == 2 {
   904  				var packedLen int
   905  				for shift := uint(0); ; shift += 7 {
   906  					if shift >= 64 {
   907  						return ErrIntOverflowInternal
   908  					}
   909  					if iNdEx >= l {
   910  						return io.ErrUnexpectedEOF
   911  					}
   912  					b := dAtA[iNdEx]
   913  					iNdEx++
   914  					packedLen |= (int(b) & 0x7F) << shift
   915  					if b < 0x80 {
   916  						break
   917  					}
   918  				}
   919  				if packedLen < 0 {
   920  					return ErrInvalidLengthInternal
   921  				}
   922  				postIndex := iNdEx + packedLen
   923  				if postIndex > l {
   924  					return io.ErrUnexpectedEOF
   925  				}
   926  				var elementCount int
   927  				var count int
   928  				for _, integer := range dAtA {
   929  					if integer < 128 {
   930  						count++
   931  					}
   932  				}
   933  				elementCount = count
   934  				if elementCount != 0 && len(m.Count) == 0 {
   935  					m.Count = make([]uint32, 0, elementCount)
   936  				}
   937  				for iNdEx < postIndex {
   938  					var v uint32
   939  					for shift := uint(0); ; shift += 7 {
   940  						if shift >= 64 {
   941  							return ErrIntOverflowInternal
   942  						}
   943  						if iNdEx >= l {
   944  							return io.ErrUnexpectedEOF
   945  						}
   946  						b := dAtA[iNdEx]
   947  						iNdEx++
   948  						v |= (uint32(b) & 0x7F) << shift
   949  						if b < 0x80 {
   950  							break
   951  						}
   952  					}
   953  					m.Count = append(m.Count, v)
   954  				}
   955  			} else {
   956  				return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
   957  			}
   958  		case 7:
   959  			if wireType == 1 {
   960  				var v uint64
   961  				if (iNdEx + 8) > l {
   962  					return io.ErrUnexpectedEOF
   963  				}
   964  				v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
   965  				iNdEx += 8
   966  				v2 := float64(math.Float64frombits(v))
   967  				m.Sum = append(m.Sum, v2)
   968  			} else if wireType == 2 {
   969  				var packedLen int
   970  				for shift := uint(0); ; shift += 7 {
   971  					if shift >= 64 {
   972  						return ErrIntOverflowInternal
   973  					}
   974  					if iNdEx >= l {
   975  						return io.ErrUnexpectedEOF
   976  					}
   977  					b := dAtA[iNdEx]
   978  					iNdEx++
   979  					packedLen |= (int(b) & 0x7F) << shift
   980  					if b < 0x80 {
   981  						break
   982  					}
   983  				}
   984  				if packedLen < 0 {
   985  					return ErrInvalidLengthInternal
   986  				}
   987  				postIndex := iNdEx + packedLen
   988  				if postIndex > l {
   989  					return io.ErrUnexpectedEOF
   990  				}
   991  				var elementCount int
   992  				elementCount = packedLen / 8
   993  				if elementCount != 0 && len(m.Sum) == 0 {
   994  					m.Sum = make([]float64, 0, elementCount)
   995  				}
   996  				for iNdEx < postIndex {
   997  					var v uint64
   998  					if (iNdEx + 8) > l {
   999  						return io.ErrUnexpectedEOF
  1000  					}
  1001  					v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1002  					iNdEx += 8
  1003  					v2 := float64(math.Float64frombits(v))
  1004  					m.Sum = append(m.Sum, v2)
  1005  				}
  1006  			} else {
  1007  				return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType)
  1008  			}
  1009  		case 8:
  1010  			if wireType == 1 {
  1011  				var v uint64
  1012  				if (iNdEx + 8) > l {
  1013  					return io.ErrUnexpectedEOF
  1014  				}
  1015  				v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1016  				iNdEx += 8
  1017  				v2 := float64(math.Float64frombits(v))
  1018  				m.Max = append(m.Max, v2)
  1019  			} else if wireType == 2 {
  1020  				var packedLen int
  1021  				for shift := uint(0); ; shift += 7 {
  1022  					if shift >= 64 {
  1023  						return ErrIntOverflowInternal
  1024  					}
  1025  					if iNdEx >= l {
  1026  						return io.ErrUnexpectedEOF
  1027  					}
  1028  					b := dAtA[iNdEx]
  1029  					iNdEx++
  1030  					packedLen |= (int(b) & 0x7F) << shift
  1031  					if b < 0x80 {
  1032  						break
  1033  					}
  1034  				}
  1035  				if packedLen < 0 {
  1036  					return ErrInvalidLengthInternal
  1037  				}
  1038  				postIndex := iNdEx + packedLen
  1039  				if postIndex > l {
  1040  					return io.ErrUnexpectedEOF
  1041  				}
  1042  				var elementCount int
  1043  				elementCount = packedLen / 8
  1044  				if elementCount != 0 && len(m.Max) == 0 {
  1045  					m.Max = make([]float64, 0, elementCount)
  1046  				}
  1047  				for iNdEx < postIndex {
  1048  					var v uint64
  1049  					if (iNdEx + 8) > l {
  1050  						return io.ErrUnexpectedEOF
  1051  					}
  1052  					v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1053  					iNdEx += 8
  1054  					v2 := float64(math.Float64frombits(v))
  1055  					m.Max = append(m.Max, v2)
  1056  				}
  1057  			} else {
  1058  				return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType)
  1059  			}
  1060  		case 9:
  1061  			if wireType == 1 {
  1062  				var v uint64
  1063  				if (iNdEx + 8) > l {
  1064  					return io.ErrUnexpectedEOF
  1065  				}
  1066  				v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1067  				iNdEx += 8
  1068  				v2 := float64(math.Float64frombits(v))
  1069  				m.Min = append(m.Min, v2)
  1070  			} else if wireType == 2 {
  1071  				var packedLen int
  1072  				for shift := uint(0); ; shift += 7 {
  1073  					if shift >= 64 {
  1074  						return ErrIntOverflowInternal
  1075  					}
  1076  					if iNdEx >= l {
  1077  						return io.ErrUnexpectedEOF
  1078  					}
  1079  					b := dAtA[iNdEx]
  1080  					iNdEx++
  1081  					packedLen |= (int(b) & 0x7F) << shift
  1082  					if b < 0x80 {
  1083  						break
  1084  					}
  1085  				}
  1086  				if packedLen < 0 {
  1087  					return ErrInvalidLengthInternal
  1088  				}
  1089  				postIndex := iNdEx + packedLen
  1090  				if postIndex > l {
  1091  					return io.ErrUnexpectedEOF
  1092  				}
  1093  				var elementCount int
  1094  				elementCount = packedLen / 8
  1095  				if elementCount != 0 && len(m.Min) == 0 {
  1096  					m.Min = make([]float64, 0, elementCount)
  1097  				}
  1098  				for iNdEx < postIndex {
  1099  					var v uint64
  1100  					if (iNdEx + 8) > l {
  1101  						return io.ErrUnexpectedEOF
  1102  					}
  1103  					v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1104  					iNdEx += 8
  1105  					v2 := float64(math.Float64frombits(v))
  1106  					m.Min = append(m.Min, v2)
  1107  				}
  1108  			} else {
  1109  				return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType)
  1110  			}
  1111  		case 10:
  1112  			if wireType == 1 {
  1113  				var v uint64
  1114  				if (iNdEx + 8) > l {
  1115  					return io.ErrUnexpectedEOF
  1116  				}
  1117  				v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1118  				iNdEx += 8
  1119  				v2 := float64(math.Float64frombits(v))
  1120  				m.First = append(m.First, v2)
  1121  			} else if wireType == 2 {
  1122  				var packedLen int
  1123  				for shift := uint(0); ; shift += 7 {
  1124  					if shift >= 64 {
  1125  						return ErrIntOverflowInternal
  1126  					}
  1127  					if iNdEx >= l {
  1128  						return io.ErrUnexpectedEOF
  1129  					}
  1130  					b := dAtA[iNdEx]
  1131  					iNdEx++
  1132  					packedLen |= (int(b) & 0x7F) << shift
  1133  					if b < 0x80 {
  1134  						break
  1135  					}
  1136  				}
  1137  				if packedLen < 0 {
  1138  					return ErrInvalidLengthInternal
  1139  				}
  1140  				postIndex := iNdEx + packedLen
  1141  				if postIndex > l {
  1142  					return io.ErrUnexpectedEOF
  1143  				}
  1144  				var elementCount int
  1145  				elementCount = packedLen / 8
  1146  				if elementCount != 0 && len(m.First) == 0 {
  1147  					m.First = make([]float64, 0, elementCount)
  1148  				}
  1149  				for iNdEx < postIndex {
  1150  					var v uint64
  1151  					if (iNdEx + 8) > l {
  1152  						return io.ErrUnexpectedEOF
  1153  					}
  1154  					v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1155  					iNdEx += 8
  1156  					v2 := float64(math.Float64frombits(v))
  1157  					m.First = append(m.First, v2)
  1158  				}
  1159  			} else {
  1160  				return fmt.Errorf("proto: wrong wireType = %d for field First", wireType)
  1161  			}
  1162  		case 11:
  1163  			if wireType == 1 {
  1164  				var v uint64
  1165  				if (iNdEx + 8) > l {
  1166  					return io.ErrUnexpectedEOF
  1167  				}
  1168  				v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1169  				iNdEx += 8
  1170  				v2 := float64(math.Float64frombits(v))
  1171  				m.Variance = append(m.Variance, v2)
  1172  			} else if wireType == 2 {
  1173  				var packedLen int
  1174  				for shift := uint(0); ; shift += 7 {
  1175  					if shift >= 64 {
  1176  						return ErrIntOverflowInternal
  1177  					}
  1178  					if iNdEx >= l {
  1179  						return io.ErrUnexpectedEOF
  1180  					}
  1181  					b := dAtA[iNdEx]
  1182  					iNdEx++
  1183  					packedLen |= (int(b) & 0x7F) << shift
  1184  					if b < 0x80 {
  1185  						break
  1186  					}
  1187  				}
  1188  				if packedLen < 0 {
  1189  					return ErrInvalidLengthInternal
  1190  				}
  1191  				postIndex := iNdEx + packedLen
  1192  				if postIndex > l {
  1193  					return io.ErrUnexpectedEOF
  1194  				}
  1195  				var elementCount int
  1196  				elementCount = packedLen / 8
  1197  				if elementCount != 0 && len(m.Variance) == 0 {
  1198  					m.Variance = make([]float64, 0, elementCount)
  1199  				}
  1200  				for iNdEx < postIndex {
  1201  					var v uint64
  1202  					if (iNdEx + 8) > l {
  1203  						return io.ErrUnexpectedEOF
  1204  					}
  1205  					v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1206  					iNdEx += 8
  1207  					v2 := float64(math.Float64frombits(v))
  1208  					m.Variance = append(m.Variance, v2)
  1209  				}
  1210  			} else {
  1211  				return fmt.Errorf("proto: wrong wireType = %d for field Variance", wireType)
  1212  			}
  1213  		default:
  1214  			iNdEx = preIndex
  1215  			skippy, err := skipInternal(dAtA[iNdEx:])
  1216  			if err != nil {
  1217  				return err
  1218  			}
  1219  			if skippy < 0 {
  1220  				return ErrInvalidLengthInternal
  1221  			}
  1222  			if (iNdEx + skippy) > l {
  1223  				return io.ErrUnexpectedEOF
  1224  			}
  1225  			iNdEx += skippy
  1226  		}
  1227  	}
  1228  
  1229  	if iNdEx > l {
  1230  		return io.ErrUnexpectedEOF
  1231  	}
  1232  	return nil
  1233  }
  1234  func (m *InternalTimeSeriesSample) Unmarshal(dAtA []byte) error {
  1235  	l := len(dAtA)
  1236  	iNdEx := 0
  1237  	for iNdEx < l {
  1238  		preIndex := iNdEx
  1239  		var wire uint64
  1240  		for shift := uint(0); ; shift += 7 {
  1241  			if shift >= 64 {
  1242  				return ErrIntOverflowInternal
  1243  			}
  1244  			if iNdEx >= l {
  1245  				return io.ErrUnexpectedEOF
  1246  			}
  1247  			b := dAtA[iNdEx]
  1248  			iNdEx++
  1249  			wire |= (uint64(b) & 0x7F) << shift
  1250  			if b < 0x80 {
  1251  				break
  1252  			}
  1253  		}
  1254  		fieldNum := int32(wire >> 3)
  1255  		wireType := int(wire & 0x7)
  1256  		if wireType == 4 {
  1257  			return fmt.Errorf("proto: InternalTimeSeriesSample: wiretype end group for non-group")
  1258  		}
  1259  		if fieldNum <= 0 {
  1260  			return fmt.Errorf("proto: InternalTimeSeriesSample: illegal tag %d (wire type %d)", fieldNum, wire)
  1261  		}
  1262  		switch fieldNum {
  1263  		case 1:
  1264  			if wireType != 0 {
  1265  				return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
  1266  			}
  1267  			m.Offset = 0
  1268  			for shift := uint(0); ; shift += 7 {
  1269  				if shift >= 64 {
  1270  					return ErrIntOverflowInternal
  1271  				}
  1272  				if iNdEx >= l {
  1273  					return io.ErrUnexpectedEOF
  1274  				}
  1275  				b := dAtA[iNdEx]
  1276  				iNdEx++
  1277  				m.Offset |= (int32(b) & 0x7F) << shift
  1278  				if b < 0x80 {
  1279  					break
  1280  				}
  1281  			}
  1282  		case 6:
  1283  			if wireType != 0 {
  1284  				return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
  1285  			}
  1286  			m.Count = 0
  1287  			for shift := uint(0); ; shift += 7 {
  1288  				if shift >= 64 {
  1289  					return ErrIntOverflowInternal
  1290  				}
  1291  				if iNdEx >= l {
  1292  					return io.ErrUnexpectedEOF
  1293  				}
  1294  				b := dAtA[iNdEx]
  1295  				iNdEx++
  1296  				m.Count |= (uint32(b) & 0x7F) << shift
  1297  				if b < 0x80 {
  1298  					break
  1299  				}
  1300  			}
  1301  		case 7:
  1302  			if wireType != 1 {
  1303  				return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType)
  1304  			}
  1305  			var v uint64
  1306  			if (iNdEx + 8) > l {
  1307  				return io.ErrUnexpectedEOF
  1308  			}
  1309  			v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1310  			iNdEx += 8
  1311  			m.Sum = float64(math.Float64frombits(v))
  1312  		case 8:
  1313  			if wireType != 1 {
  1314  				return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType)
  1315  			}
  1316  			var v uint64
  1317  			if (iNdEx + 8) > l {
  1318  				return io.ErrUnexpectedEOF
  1319  			}
  1320  			v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1321  			iNdEx += 8
  1322  			v2 := float64(math.Float64frombits(v))
  1323  			m.Max = &v2
  1324  		case 9:
  1325  			if wireType != 1 {
  1326  				return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType)
  1327  			}
  1328  			var v uint64
  1329  			if (iNdEx + 8) > l {
  1330  				return io.ErrUnexpectedEOF
  1331  			}
  1332  			v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1333  			iNdEx += 8
  1334  			v2 := float64(math.Float64frombits(v))
  1335  			m.Min = &v2
  1336  		default:
  1337  			iNdEx = preIndex
  1338  			skippy, err := skipInternal(dAtA[iNdEx:])
  1339  			if err != nil {
  1340  				return err
  1341  			}
  1342  			if skippy < 0 {
  1343  				return ErrInvalidLengthInternal
  1344  			}
  1345  			if (iNdEx + skippy) > l {
  1346  				return io.ErrUnexpectedEOF
  1347  			}
  1348  			iNdEx += skippy
  1349  		}
  1350  	}
  1351  
  1352  	if iNdEx > l {
  1353  		return io.ErrUnexpectedEOF
  1354  	}
  1355  	return nil
  1356  }
  1357  func skipInternal(dAtA []byte) (n int, err error) {
  1358  	l := len(dAtA)
  1359  	iNdEx := 0
  1360  	for iNdEx < l {
  1361  		var wire uint64
  1362  		for shift := uint(0); ; shift += 7 {
  1363  			if shift >= 64 {
  1364  				return 0, ErrIntOverflowInternal
  1365  			}
  1366  			if iNdEx >= l {
  1367  				return 0, io.ErrUnexpectedEOF
  1368  			}
  1369  			b := dAtA[iNdEx]
  1370  			iNdEx++
  1371  			wire |= (uint64(b) & 0x7F) << shift
  1372  			if b < 0x80 {
  1373  				break
  1374  			}
  1375  		}
  1376  		wireType := int(wire & 0x7)
  1377  		switch wireType {
  1378  		case 0:
  1379  			for shift := uint(0); ; shift += 7 {
  1380  				if shift >= 64 {
  1381  					return 0, ErrIntOverflowInternal
  1382  				}
  1383  				if iNdEx >= l {
  1384  					return 0, io.ErrUnexpectedEOF
  1385  				}
  1386  				iNdEx++
  1387  				if dAtA[iNdEx-1] < 0x80 {
  1388  					break
  1389  				}
  1390  			}
  1391  			return iNdEx, nil
  1392  		case 1:
  1393  			iNdEx += 8
  1394  			return iNdEx, nil
  1395  		case 2:
  1396  			var length int
  1397  			for shift := uint(0); ; shift += 7 {
  1398  				if shift >= 64 {
  1399  					return 0, ErrIntOverflowInternal
  1400  				}
  1401  				if iNdEx >= l {
  1402  					return 0, io.ErrUnexpectedEOF
  1403  				}
  1404  				b := dAtA[iNdEx]
  1405  				iNdEx++
  1406  				length |= (int(b) & 0x7F) << shift
  1407  				if b < 0x80 {
  1408  					break
  1409  				}
  1410  			}
  1411  			iNdEx += length
  1412  			if length < 0 {
  1413  				return 0, ErrInvalidLengthInternal
  1414  			}
  1415  			return iNdEx, nil
  1416  		case 3:
  1417  			for {
  1418  				var innerWire uint64
  1419  				var start int = iNdEx
  1420  				for shift := uint(0); ; shift += 7 {
  1421  					if shift >= 64 {
  1422  						return 0, ErrIntOverflowInternal
  1423  					}
  1424  					if iNdEx >= l {
  1425  						return 0, io.ErrUnexpectedEOF
  1426  					}
  1427  					b := dAtA[iNdEx]
  1428  					iNdEx++
  1429  					innerWire |= (uint64(b) & 0x7F) << shift
  1430  					if b < 0x80 {
  1431  						break
  1432  					}
  1433  				}
  1434  				innerWireType := int(innerWire & 0x7)
  1435  				if innerWireType == 4 {
  1436  					break
  1437  				}
  1438  				next, err := skipInternal(dAtA[start:])
  1439  				if err != nil {
  1440  					return 0, err
  1441  				}
  1442  				iNdEx = start + next
  1443  			}
  1444  			return iNdEx, nil
  1445  		case 4:
  1446  			return iNdEx, nil
  1447  		case 5:
  1448  			iNdEx += 4
  1449  			return iNdEx, nil
  1450  		default:
  1451  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1452  		}
  1453  	}
  1454  	panic("unreachable")
  1455  }
  1456  
  1457  var (
  1458  	ErrInvalidLengthInternal = fmt.Errorf("proto: negative length found during unmarshaling")
  1459  	ErrIntOverflowInternal   = fmt.Errorf("proto: integer overflow")
  1460  )
  1461  
  1462  func init() { proto.RegisterFile("roachpb/internal.proto", fileDescriptor_internal_10ecd69bc61e348f) }
  1463  
  1464  var fileDescriptor_internal_10ecd69bc61e348f = []byte{
  1465  	// 408 bytes of a gzipped FileDescriptorProto
  1466  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xb1, 0x8e, 0xd3, 0x30,
  1467  	0x00, 0x86, 0xe3, 0x73, 0xd2, 0x1e, 0x3e, 0x9d, 0x54, 0xcc, 0x11, 0x59, 0x15, 0xf2, 0x45, 0x37,
  1468  	0x19, 0x21, 0xe5, 0x24, 0x26, 0xc4, 0x18, 0xdd, 0xc2, 0x00, 0x43, 0xef, 0x26, 0x96, 0xca, 0x04,
  1469  	0xf7, 0xb0, 0x68, 0xec, 0xc8, 0x76, 0x51, 0x1f, 0x83, 0x89, 0x99, 0x9d, 0x17, 0xe0, 0x11, 0x3a,
  1470  	0x76, 0xec, 0x84, 0x20, 0x7d, 0x11, 0x14, 0xc7, 0x49, 0x41, 0xd5, 0x6d, 0xcd, 0xf7, 0xff, 0xbf,
  1471  	0xe5, 0xaf, 0x46, 0xa9, 0xd1, 0xbc, 0xfc, 0x54, 0x7f, 0xb8, 0x96, 0xca, 0x09, 0xa3, 0xf8, 0x32,
  1472  	0xaf, 0x8d, 0x76, 0x1a, 0x3f, 0x2e, 0x75, 0xf9, 0xd9, 0x67, 0x79, 0x68, 0x4c, 0x2f, 0xee, 0xf5,
  1473  	0xbd, 0xf6, 0xe9, 0x75, 0xfb, 0xab, 0x2b, 0x5e, 0xfd, 0x80, 0x28, 0x7d, 0x13, 0xb6, 0x77, 0xb2,
  1474  	0x12, 0xb7, 0xc2, 0x48, 0x61, 0x6f, 0xb8, 0xe3, 0xf8, 0x15, 0x7a, 0x6a, 0x1d, 0x37, 0x6e, 0xee,
  1475  	0x64, 0x25, 0xac, 0xe3, 0x55, 0x3d, 0x57, 0x5c, 0x69, 0x4b, 0x40, 0x06, 0x18, 0x2c, 0xe2, 0xcd,
  1476  	0xaf, 0xcb, 0x68, 0xf6, 0xc4, 0x57, 0xee, 0xfa, 0xc6, 0xbb, 0xb6, 0xe0, 0x97, 0xbc, 0xaa, 0x97,
  1477  	0x62, 0xfe, 0x71, 0x65, 0xb8, 0x93, 0x5a, 0x85, 0xe5, 0xc9, 0x7f, 0x4b, 0x5f, 0xb9, 0x09, 0x8d,
  1478  	0x6e, 0xf9, 0x16, 0x8d, 0x3b, 0x6c, 0x09, 0xcc, 0x20, 0x3b, 0x7b, 0xf9, 0x22, 0x3f, 0x32, 0xc9,
  1479  	0x8f, 0xef, 0x7b, 0xeb, 0x37, 0xc5, 0xa8, 0x3d, 0x98, 0x80, 0x59, 0x7f, 0x06, 0x9e, 0xa2, 0x91,
  1480  	0x5e, 0x2c, 0xac, 0x70, 0x24, 0xce, 0x20, 0x4b, 0x8a, 0x93, 0x09, 0x98, 0x05, 0x82, 0x53, 0x14,
  1481  	0x2f, 0xb9, 0x75, 0x24, 0xc9, 0x20, 0x03, 0x3e, 0xf1, 0xdf, 0x98, 0xa0, 0xa4, 0xd4, 0x2b, 0xe5,
  1482  	0xc8, 0x28, 0x83, 0xec, 0xdc, 0x07, 0x1d, 0xc0, 0x17, 0x08, 0xda, 0x55, 0x45, 0xc6, 0xc3, 0xa0,
  1483  	0xfd, 0x6c, 0x69, 0xc5, 0xd7, 0xe4, 0xf4, 0x40, 0x2b, 0xbe, 0xf6, 0x54, 0x2a, 0xf2, 0xe8, 0x1f,
  1484  	0x2a, 0x55, 0x7b, 0xf6, 0x42, 0x1a, 0xeb, 0x08, 0x1a, 0x78, 0x07, 0x30, 0x45, 0xa7, 0x5f, 0xb8,
  1485  	0x91, 0x5c, 0x95, 0x82, 0x9c, 0x0d, 0xe1, 0xc0, 0x5e, 0xc7, 0x3f, 0xbf, 0x5f, 0x82, 0xab, 0x6f,
  1486  	0x00, 0x91, 0x87, 0xec, 0xf1, 0xb3, 0x41, 0xb6, 0x7d, 0xa0, 0x24, 0xfc, 0xcd, 0xbd, 0xee, 0xf4,
  1487  	0xa0, 0x05, 0xd8, 0x79, 0x08, 0x83, 0x58, 0xda, 0x8b, 0x01, 0x06, 0x42, 0xe2, 0xd5, 0x26, 0xbd,
  1488  	0x1a, 0x60, 0x41, 0x6b, 0xd2, 0x6b, 0x75, 0x44, 0xaa, 0xee, 0x62, 0xc5, 0xf3, 0xcd, 0x1f, 0x1a,
  1489  	0x6d, 0x1a, 0x0a, 0xb6, 0x0d, 0x05, 0xbb, 0x86, 0x82, 0xdf, 0x0d, 0x05, 0x5f, 0xf7, 0x34, 0xda,
  1490  	0xee, 0x69, 0xb4, 0xdb, 0xd3, 0xe8, 0xfd, 0x38, 0xbc, 0xde, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff,
  1491  	0x2b, 0x28, 0x34, 0x60, 0xb3, 0x02, 0x00, 0x00,
  1492  }