The Prometheus monitoring system and time series database.
Find a file
Brian Brazil f9bc0817a1
Avoid allocation in mergedPostings.Seek. (#586)
See
https://github.com/prometheus/prometheus/issues/5424#issuecomment-485199651

benchmark                                                            old
ns/op      new ns/op       delta
BenchmarkHeadPostingForMatchers/n="1"-4
5266           5267            +0.02%
BenchmarkHeadPostingForMatchers/n="1",j="foo"-4
6469           7801            +20.59%
BenchmarkHeadPostingForMatchers/j="foo",n="1"-4
4984           4963            -0.42%
BenchmarkHeadPostingForMatchers/n="1",j!="foo"-4
7137           7527            +5.46%
BenchmarkHeadPostingForMatchers/i=~".*"-4
8055830839     8117651746      +0.77%
BenchmarkHeadPostingForMatchers/i=~".+"-4
9369298293     9742710251      +3.99%
BenchmarkHeadPostingForMatchers/i=~""-4
2363120708     2507789029      +6.12%
BenchmarkHeadPostingForMatchers/i!=""-4
9387069195     11740628557     +25.07%
BenchmarkHeadPostingForMatchers/n="1",i=~".*",j="foo"-4
109668312      107644136       -1.85%
BenchmarkHeadPostingForMatchers/n="1",i=~".*",i!="2",j="foo"-4
106022679      105759760       -0.25%
BenchmarkHeadPostingForMatchers/n="1",i!="",j="foo"-4
330201810      266421024       -19.32%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",j="foo"-4
355627801      292774913       -17.67%
BenchmarkHeadPostingForMatchers/n="1",i=~"1.+",j="foo"-4
108132305      106697690       -1.33%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",i!="2",j="foo"-4
358836972      362579998       +1.04%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",i!~"2.*",j="foo"-4
555879392      575858378       +3.59%

benchmark                                                            old
allocs     new allocs     delta
BenchmarkHeadPostingForMatchers/n="1"-4                              8
8              +0.00%
BenchmarkHeadPostingForMatchers/n="1",j="foo"-4                      11
11             +0.00%
BenchmarkHeadPostingForMatchers/j="foo",n="1"-4                      11
11             +0.00%
BenchmarkHeadPostingForMatchers/n="1",j!="foo"-4                     17
17             +0.00%
BenchmarkHeadPostingForMatchers/i=~".*"-4                            58
58             +0.00%
BenchmarkHeadPostingForMatchers/i=~".+"-4
100115         100115         +0.00%
BenchmarkHeadPostingForMatchers/i=~""-4
100125         100125         +0.00%
BenchmarkHeadPostingForMatchers/i!=""-4
100112         100112         +0.00%
BenchmarkHeadPostingForMatchers/n="1",i=~".*",j="foo"-4              19
19             +0.00%
BenchmarkHeadPostingForMatchers/n="1",i=~".*",i!="2",j="foo"-4       22
22             +0.00%
BenchmarkHeadPostingForMatchers/n="1",i!="",j="foo"-4
100109         100079         -0.03%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",j="foo"-4
100110         100079         -0.03%
BenchmarkHeadPostingForMatchers/n="1",i=~"1.+",j="foo"-4
11176          11167          -0.08%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",i!="2",j="foo"-4
100112         100082         -0.03%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",i!~"2.*",j="foo"-4
111307         111277         -0.03%

benchmark                                                            old
bytes     new bytes     delta
BenchmarkHeadPostingForMatchers/n="1"-4
1360          1360          +0.00%
BenchmarkHeadPostingForMatchers/n="1",j="foo"-4
1392          1392          +0.00%
BenchmarkHeadPostingForMatchers/j="foo",n="1"-4
1392          1392          +0.00%
BenchmarkHeadPostingForMatchers/n="1",j!="foo"-4
1520          1520          +0.00%
BenchmarkHeadPostingForMatchers/i=~".*"-4
258254040     258254040     +0.00%
BenchmarkHeadPostingForMatchers/i=~".+"-4
281554280     281554280     +0.00%
BenchmarkHeadPostingForMatchers/i=~""-4
241554888     241554888     +0.00%
BenchmarkHeadPostingForMatchers/i!=""-4
281553664     281553664     +0.00%
BenchmarkHeadPostingForMatchers/n="1",i=~".*",j="foo"-4
1607277       1607277       +0.00%
BenchmarkHeadPostingForMatchers/n="1",i=~".*",i!="2",j="foo"-4
1607389       1607389       +0.00%
BenchmarkHeadPostingForMatchers/n="1",i!="",j="foo"-4
73076560      24907600      -65.92%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",j="foo"-4
73076765      24907723      -65.92%
BenchmarkHeadPostingForMatchers/n="1",i=~"1.+",j="foo"-4
5416925       3794909       -29.94%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",i!="2",j="foo"-4
73076779      24907819      -65.92%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",i!~"2.*",j="foo"-4
99874860      51705900      -48.23%

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2019-04-24 13:12:58 +01:00
chunkenc Remove obsolete FromData function (#540) 2019-03-06 11:12:28 +02:00
chunks remove Fsync workaround for macos. (#574) 2019-04-03 11:16:54 +03:00
cmd/tsdb Fixed default benchmark test path (#571) 2019-03-27 16:33:59 +02:00
docs/format docs: add multi chunks layout in chunks readme file (#567) 2019-03-25 12:33:38 +02:00
encoding Fix exported function comments (#566) 2019-03-25 10:17:28 +02:00
errors Test createBlock and check all os.RemoveAll in the tests for errors. (#549) 2019-03-19 15:31:57 +02:00
fileutil remove Fsync workaround for macos. (#574) 2019-04-03 11:16:54 +03:00
goversion remove Fsync workaround for macos. (#574) 2019-04-03 11:16:54 +03:00
index Avoid allocation in mergedPostings.Seek. (#586) 2019-04-24 13:12:58 +01:00
labels Be smarter in how we look at matchers. (#572) 2019-04-09 11:59:45 +01:00
test index: simplify checksum validation 2017-11-09 15:58:36 +00:00
testdata Add repair test 2018-02-09 13:43:42 +01:00
testutil Test to corrupt segments mid-WAL, repair and check we can read the correct number of records. (#528) 2019-02-18 19:05:07 +00:00
tsdbutil Add license headers to missing files (#447) 2018-11-06 20:19:42 +02:00
wal remove Fsync workaround for macos. (#574) 2019-04-03 11:16:54 +03:00
.gitignore Add default benchmark output dir to .gitignore 2018-01-14 11:07:52 +00:00
.travis.yml remove Fsync workaround for macos. (#574) 2019-04-03 11:16:54 +03:00
block.go use fsync to force persisting the meta file. (#573) 2019-04-01 16:23:45 +03:00
block_test.go Verify chunk format version (#544) 2019-03-24 22:33:08 +02:00
CHANGELOG.md release 0.7.0 (#580) 2019-04-10 14:58:20 +03:00
checkpoint.go Test createBlock and check all os.RemoveAll in the tests for errors. (#549) 2019-03-19 15:31:57 +02:00
checkpoint_test.go Test createBlock and check all os.RemoveAll in the tests for errors. (#549) 2019-03-19 15:31:57 +02:00
compact.go selectOverlappingDirs selects wrong dirs where there are 2 disjoint sets of overlapping dirs 2019-04-08 15:27:06 +03:00
compact_test.go selectOverlappingDirs selects wrong dirs where there are 2 disjoint sets of overlapping dirs 2019-04-08 15:27:06 +03:00
db.go remove Fsync workaround for macos. (#574) 2019-04-03 11:16:54 +03:00
db_test.go selectOverlappingDirs selects wrong dirs where there are 2 disjoint sets of overlapping dirs 2019-04-08 15:27:06 +03:00
go.mod Use Go modules (#454) 2018-11-28 11:39:56 +01:00
go.sum Use Go modules (#454) 2018-11-28 11:39:56 +01:00
head.go Keep series that are still in WAL in checkpoints (#577) 2019-04-09 14:16:24 +01:00
head_bench_test.go Be smarter in how we look at matchers. (#572) 2019-04-09 11:59:45 +01:00
head_test.go Keep series that are still in WAL in checkpoints (#577) 2019-04-09 14:16:24 +01:00
LICENSE Add license file 2017-04-10 21:02:42 +02:00
MAINTAINERS.md add maintainers file (#404) 2018-10-15 14:32:00 +03:00
Makefile Update Makefile.common (#548) 2019-03-13 10:40:17 +02:00
Makefile.common Synchronize Makefile.common from prometheus/prometheus (#584) 2019-04-18 14:26:25 +03:00
mocks_test.go Vertical query merging and compaction (#370) 2019-02-14 14:29:41 +01:00
querier.go Be smarter in how we look at matchers. (#572) 2019-04-09 11:59:45 +01:00
querier_test.go Avoid potential collision of createIdxChkReaders in querier_test.go (#585) 2019-04-18 16:11:39 +03:00
README.md README: move the build badge to the badge list (#555) 2019-03-18 14:44:58 +02:00
record.go Merge encoding_helpers.go to tsdbutil (#526) 2019-02-22 19:11:11 +02:00
record_test.go Add test for be64() in encoding/encoding.go (#521) (#533) 2019-02-23 11:51:47 +02:00
repair.go remove Fsync workaround for macos. (#574) 2019-04-03 11:16:54 +03:00
repair_test.go Test createBlock and check all os.RemoveAll in the tests for errors. (#549) 2019-03-19 15:31:57 +02:00
tombstones.go force persisting the tombstone file (#578) 2019-04-08 15:06:40 +03:00
tombstones_test.go Test createBlock and check all os.RemoveAll in the tests for errors. (#549) 2019-03-19 15:31:57 +02:00
wal.go Merge encoding_helpers.go to tsdbutil (#526) 2019-02-22 19:11:11 +02:00
wal_test.go Test createBlock and check all os.RemoveAll in the tests for errors. (#549) 2019-03-19 15:31:57 +02:00

TSDB

Build Status GoDoc Go Report Card

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.