mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
259847a6b1
* Add unittests for PostingsForMatcher. * Selector methods are all stateless, don't need a reference. * Be smarter in how we look at matchers. Look at all matchers to see if a label can be empty. Optimise Not handling, so i!="2" is a simple lookup rather than an inverse postings list. All all the Withouts together, rather than having to subtract each from all postings. Change the pre-expand the postings logic to always do it before doing a Without only. Don't do that if it's already a list. The initial goal here was that the oft-seen pattern i=~"something.+",i!="foo",i!="bar" becomes more efficient. benchmark old ns/op new ns/op delta BenchmarkHeadPostingForMatchers/n="1"-4 5888 6160 +4.62% BenchmarkHeadPostingForMatchers/n="1",j="foo"-4 7190 6640 -7.65% BenchmarkHeadPostingForMatchers/j="foo",n="1"-4 6038 5923 -1.90% BenchmarkHeadPostingForMatchers/n="1",j!="foo"-4 6030884 4850525 -19.57% BenchmarkHeadPostingForMatchers/i=~".*"-4 887377940 230329137 -74.04% BenchmarkHeadPostingForMatchers/i=~".+"-4 490316101 319931758 -34.75% BenchmarkHeadPostingForMatchers/i=~""-4 594961991 130279313 -78.10% BenchmarkHeadPostingForMatchers/i!=""-4 537542388 318751015 -40.70% BenchmarkHeadPostingForMatchers/n="1",i=~".*",j="foo"-4 10460243 8565195 -18.12% BenchmarkHeadPostingForMatchers/n="1",i=~".*",i!="2",j="foo"-4 44964267 8561546 -80.96% BenchmarkHeadPostingForMatchers/n="1",i!="",j="foo"-4 42244885 29137737 -31.03% BenchmarkHeadPostingForMatchers/n="1",i=~".+",j="foo"-4 35285834 32774584 -7.12% BenchmarkHeadPostingForMatchers/n="1",i=~"1.+",j="foo"-4 8951047 8379024 -6.39% BenchmarkHeadPostingForMatchers/n="1",i=~".+",i!="2",j="foo"-4 63813335 30672688 -51.93% BenchmarkHeadPostingForMatchers/n="1",i=~".+",i!~"2.*",j="foo"-4 45381112 44924397 -1.01% Signed-off-by: Brian Brazil <brian.brazil@robustperception.io> |
||
---|---|---|
chunkenc | ||
chunks | ||
cmd/tsdb | ||
docs/format | ||
encoding | ||
errors | ||
fileutil | ||
goversion | ||
index | ||
labels | ||
test | ||
testdata | ||
testutil | ||
tsdbutil | ||
wal | ||
.gitignore | ||
.travis.yml | ||
block.go | ||
block_test.go | ||
CHANGELOG.md | ||
checkpoint.go | ||
checkpoint_test.go | ||
compact.go | ||
compact_test.go | ||
db.go | ||
db_test.go | ||
go.mod | ||
go.sum | ||
head.go | ||
head_bench_test.go | ||
head_test.go | ||
LICENSE | ||
MAINTAINERS.md | ||
Makefile | ||
Makefile.common | ||
mocks_test.go | ||
querier.go | ||
querier_test.go | ||
README.md | ||
record.go | ||
record_test.go | ||
repair.go | ||
repair_test.go | ||
tombstones.go | ||
tombstones_test.go | ||
wal.go | ||
wal_test.go |
TSDB
This repository contains the Prometheus storage layer that is used in its 2.x releases.
A writeup of its design can be found here.
Based on the Gorilla TSDB white papers.
Video: Storing 16 Bytes at Scale from PromCon 2017.
See also the format documentation.