mirror of https://github.com/prometheus/prometheus
tsdb documenation: More details about chunks
Signed-off-by: Antoine Pultier <45740+fungiboletus@users.noreply.github.com>pull/14826/head
parent
6ef1eb4e68
commit
f5971bf292
|
@ -29,15 +29,16 @@ in-file offset (lower 4 bytes) and segment sequence number (upper 4 bytes).
|
|||
# Chunk
|
||||
|
||||
```
|
||||
┌───────────────┬───────────────────┬──────────────┬────────────────┐
|
||||
│ len <uvarint> │ encoding <1 byte> │ data <bytes> │ CRC32 <4 byte> │
|
||||
└───────────────┴───────────────────┴──────────────┴────────────────┘
|
||||
┌───────────────┬───────────────────┬──────────────┬─────────────────┐
|
||||
│ len <uvarint> │ encoding <1 byte> │ data <bytes> │ CRC32C <4 byte> │
|
||||
└───────────────┴───────────────────┴──────────────┴─────────────────┘
|
||||
```
|
||||
|
||||
Notes:
|
||||
* `<uvarint>` has 1 to 10 bytes.
|
||||
* `encoding`: Currently either `XOR` or `histogram`.
|
||||
* `<uvarint>` has 1 to 10 bytes, from [`encoding/binary`](https://go.dev/src/encoding/binary/varint.go).
|
||||
* `encoding`: Currently either `XOR` (1), `histogram` (2), or `float histogram` (3).
|
||||
* `data`: See below for each encoding.
|
||||
* `CRC32C`: CRC32 Castagnoli of `encoding` and `data`, serialised as an unsigned 32 bits big endian.
|
||||
|
||||
## XOR chunk data
|
||||
|
||||
|
|
Loading…
Reference in New Issue