mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
symbolCacheEntry field type alignment, thus saving 8 bytes.
Signed-off-by: songjiayang <songjiayang1@gmail.com>
This commit is contained in:
parent
ab2a7bb74f
commit
443867f1aa
|
@ -107,8 +107,8 @@ func newCRC32() hash.Hash32 {
|
|||
|
||||
type symbolCacheEntry struct {
|
||||
index uint32
|
||||
lastValue string
|
||||
lastValueIndex uint32
|
||||
lastValue string
|
||||
}
|
||||
|
||||
// Writer implements the IndexWriter interface for the standard
|
||||
|
@ -457,8 +457,8 @@ func (w *Writer) AddSeries(ref storage.SeriesRef, lset labels.Labels, chunks ...
|
|||
}
|
||||
w.symbolCache[l.Name] = symbolCacheEntry{
|
||||
index: nameIndex,
|
||||
lastValue: l.Value,
|
||||
lastValueIndex: valueIndex,
|
||||
lastValue: l.Value,
|
||||
}
|
||||
}
|
||||
w.buf2.PutUvarint32(valueIndex)
|
||||
|
|
Loading…
Reference in a new issue