mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 21:24:05 -08:00
82860a770c
* tsdb: fix exemplar benchmarks Go benchmarks are expected to do an amount of work that varies with the `b.N` parameter. Previously these benchmarks would report a result like 0.01 ns/op, which is nonsense. Signed-off-by: Bryan Boreham <bjboreham@gmail.com> * tsdb: use simpler map key to improve exemplar perf Prometheus holds an index of exemplars so it can discard the oldest one for a series when a new one is added. Since the keys are not for human eyes, we can use a simpler format and save the effort of quoting label values. Signed-off-by: Bryan Boreham <bjboreham@gmail.com> * Exemplars: allocate index map with estimated size This avoids Go having to re-size the map several times as it grows. 16 exemplars per series is a guess; if it is too low then the map will be sparse, while if it is too high then the map will have to resize once or twice. Signed-off-by: Bryan Boreham <bjboreham@gmail.com> |
||
---|---|---|
.. | ||
agent | ||
chunkenc | ||
chunks | ||
docs | ||
encoding | ||
errors | ||
fileutil | ||
goversion | ||
index | ||
record | ||
test | ||
testdata | ||
tombstones | ||
tsdbutil | ||
wal | ||
.gitignore | ||
block.go | ||
block_test.go | ||
blockwriter.go | ||
blockwriter_test.go | ||
CHANGELOG.md | ||
compact.go | ||
compact_test.go | ||
db.go | ||
db_test.go | ||
example_test.go | ||
exemplar.go | ||
exemplar_test.go | ||
head.go | ||
head_append.go | ||
head_bench_test.go | ||
head_read.go | ||
head_test.go | ||
head_wal.go | ||
isolation.go | ||
isolation_test.go | ||
mocks_test.go | ||
querier.go | ||
querier_bench_test.go | ||
querier_test.go | ||
README.md | ||
repair.go | ||
repair_test.go | ||
tsdbblockutil.go | ||
wal.go | ||
wal_test.go |
TSDB
This directory contains the Prometheus TSDB (Time Series DataBase) library, which handles storage and querying of all Prometheus v2 data.
Due to an issue with versioning, the "latest" docs shown on Godoc are outdated. Instead you may use the docs for v2.31.1
Documentation
External resources
- A writeup of the original design can be found here.
- Video: Storing 16 Bytes at Scale from PromCon 2017.
- Compression is based on the Gorilla TSDB white paper.
A series of blog posts explaining different components of TSDB: