mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-20 23:46:23 +01:00
24 lines
505 B
Go
24 lines
505 B
Go
|
package storage
|
||
|
|
||
|
// rawBlock represents a raw block of a single time-series rows.
|
||
|
type rawBlock struct {
|
||
|
TSID TSID
|
||
|
|
||
|
Timestamps []int64
|
||
|
Values []float64
|
||
|
}
|
||
|
|
||
|
// Reset resets rb.
|
||
|
func (rb *rawBlock) Reset() {
|
||
|
rb.TSID = TSID{}
|
||
|
rb.Timestamps = rb.Timestamps[:0]
|
||
|
rb.Values = rb.Values[:0]
|
||
|
}
|
||
|
|
||
|
// CopyFrom copies src to rb.
|
||
|
func (rb *rawBlock) CopyFrom(src *rawBlock) {
|
||
|
rb.TSID = src.TSID
|
||
|
rb.Timestamps = append(rb.Timestamps[:0], src.Timestamps...)
|
||
|
rb.Values = append(rb.Values[:0], src.Values...)
|
||
|
}
|