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 {
|
type symbolCacheEntry struct {
|
||||||
index uint32
|
index uint32
|
||||||
lastValue string
|
|
||||||
lastValueIndex uint32
|
lastValueIndex uint32
|
||||||
|
lastValue string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Writer implements the IndexWriter interface for the standard
|
// 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{
|
w.symbolCache[l.Name] = symbolCacheEntry{
|
||||||
index: nameIndex,
|
index: nameIndex,
|
||||||
lastValue: l.Value,
|
|
||||||
lastValueIndex: valueIndex,
|
lastValueIndex: valueIndex,
|
||||||
|
lastValue: l.Value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
w.buf2.PutUvarint32(valueIndex)
|
w.buf2.PutUvarint32(valueIndex)
|
||||||
|
|
Loading…
Reference in New Issue