mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Change chunk sample number to BigEndian
This commit is contained in:
parent
81b4d570ad
commit
70a0224f19
|
@ -45,7 +45,7 @@ func FromData(e Encoding, d []byte) (Chunk, error) {
|
||||||
case EncXOR:
|
case EncXOR:
|
||||||
return &XORChunk{
|
return &XORChunk{
|
||||||
b: &bstream{count: 8},
|
b: &bstream{count: 8},
|
||||||
num: binary.LittleEndian.Uint16(d),
|
num: binary.BigEndian.Uint16(d),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("unknown chunk encoding: %d", e)
|
return nil, fmt.Errorf("unknown chunk encoding: %d", e)
|
||||||
|
|
|
@ -34,7 +34,7 @@ func (c *XORChunk) Bytes() []byte {
|
||||||
b := c.b.bytes()
|
b := c.b.bytes()
|
||||||
// Lazily populate length bytes – probably not necessary to have the
|
// Lazily populate length bytes – probably not necessary to have the
|
||||||
// cache value in struct.
|
// cache value in struct.
|
||||||
binary.LittleEndian.PutUint16(b[:2], c.num)
|
binary.BigEndian.PutUint16(b[:2], c.num)
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue