Commit Graph

77 Commits

Author SHA1 Message Date
Chris Marchbanks 92d15169fc Print label names with highest cumulative label value length during tsdb analyze (#626)
Signed-off-by: Ryan Scott <rscott@splunk.com>
Co-authored-by: Chris Marchbanks <csmarchbanks@gmail.com>
2019-06-21 11:07:50 +03:00
mrasu 3db36f021b Fix `make bench` (#610)
Remove  flag -log.level
Signed-off-by: mrasu <m.rasu.hitsuji@gmail.com>
2019-06-03 22:37:24 +02:00
Krasi Georgiev 288f67efbf
fix some unchecked errors and remove unused vars. (#592)
Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2019-04-25 13:07:04 +03:00
Vladimir Masarik fd188be052 Fixed default benchmark test path (#571)
Signed-off-by: Vladimir Masarik <vmasarik@redhat.com>
2019-03-27 16:33:59 +02:00
Julius Volz 752e022aba Add "dump" command to tsdb tool to dump all samples (#532)
* Add "dump" command to tsdb tool to dump all samples

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-02-25 15:51:33 +02:00
Simon Pasquier 2e69508536 Merge branch 'master' into update-makefile-common
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-22 10:47:31 +01:00
Ye Ben a360aa3e86 change variable name metrics to labels (#496)
Signed-off-by: yeya24 <ben.ye@daocloud.io>
2019-01-14 11:44:32 +03:00
Simon Pasquier d5d7a097e1 Update Makefile.common
This change also uses the latest staticcheck version which comes with
new verifications, hence some clean up in the code.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-04 16:08:43 +01:00
Krasi Georgiev 48c439d26d
fix statick check errors (#475)
fix the tests for `check_license` and `staticcheck`

the static check also found some actual bugs.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2019-01-02 19:48:42 +03:00
Krasi Georgiev 2e0571caba
remove unused WALFlushInterval option and NopWAL struct (#468)
The WALFlushInterval is not used anywhere in the code base.
The WAL is not an interface anymore to save some lookup time so can't use NopWAL in the tests. Instead can just pass nil as the code checks for that and it is essentially a noop.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2018-12-28 20:42:46 +03:00
Brian Brazil 915d7cf937
Add a tsdbutil command to analyse churn etc. (#478)
This reports the cardinality of each label,
the total number of label pairs,
and how much series worth of time is "uncovered"
by series data. Which is basically how much churn there is.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2018-12-28 17:06:12 +00:00
Ben a8351dc9d0 Using filepath.Join() instead of strings with slashes (#428)
fixes: https://github.com/prometheus/tsdb/issues/426
Using `filepath.Join()` instead of strings containing forward slash path delimiters (needed for non-*nix OSes), as suggested by @krasi-georgiev
2018-10-25 10:32:57 +01:00
Martin Chodur dbd765a0e3 Refactor Makefile to use Makefile.common (#324)
make use of the Makefile.common

Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
2018-09-21 11:08:38 +03:00
Julius Volz 5ae6c60d39 Handle a bunch of unchecked errors (#365)
As discovered by "gosec".

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2018-09-20 11:33:52 +03:00
Krasi Georgiev 2aae939d6c
Merge pull request #256 from mattbostock/fix_bench_default_file
bench: Fix path to default sample file
2018-05-15 10:25:56 +03:00
Martin Chodur 30ca799ca7
feat cmd/tsdb: added human readable print for timestamps on block list 2018-05-08 13:35:06 +02:00
Matt Bostock 793c1078dd bench: Fix path to default sample file
The sample file used for benchmarking was renamed in 8326e410d0 but
the `--file` flag default was not updated.
2018-03-25 23:24:30 +08:00
Callum Styan bcde61b237 we shouldn't assume we'll receive the labels in sorted order 2017-12-18 15:32:39 -08:00
Callum Styan 8326e410d0 decouple tsdb main.go (and tests) from prometheus/pkg 2017-12-18 15:26:16 -08:00
Fabian Reinartz d226411a2a db: delete old blocks during reload
Windows requires blocks to be closed before deleting their directories.
This adds a set of deleteable blocks to reload(), which then deletes
them without causing disruption to querying.
2017-11-03 20:41:24 +01:00
Fabian Reinartz 6a10761b50 Remove GetTabWriter from tsdb package 2017-10-19 18:14:37 +02:00
Fabian Reinartz 91a154d228 Fix block printing in cmd/main 2017-10-11 11:02:57 +02:00
Bas Harenslak a41dad30fb Move printing db.blocks to main.go 2017-10-02 22:48:47 +02:00
Bas Harenslak 9945a67bff Replace columnize by stdlib tabwriter 2017-10-02 22:29:51 +02:00
Bas Harenslak e190c7c78d Add list blocks command to CLI 2017-10-01 22:18:50 +02:00
Fabian Reinartz 162a48e4f2 Create series with ID recorded in WAL when reading it back 2017-09-19 11:31:16 +02:00
Fabian Reinartz 99d39174f6 Merge branch 'master' of github.com:prometheus/tsdb 2017-09-18 11:20:45 +02:00
Fabian Reinartz 8214dc82a7 Remove infinite block in benchmark 2017-09-18 11:20:25 +02:00
Fabian Reinartz e45bb1d328 Merge pull request #142 from krasi-georgiev/107-swap-cobra-with-kingpin
replaced cobra with kingpin for the tsdb cli tool
2017-09-12 19:28:35 +02:00
Krasi Georgiev 92d0414993 replaced cobra with kingpin
Signed-off-by: Krasi Georgiev <krasi.root@gmail.com>
2017-09-10 12:35:02 +03:00
Fabian Reinartz 6892fc6dcb Finish old WAL segment async, default to no fsync
We were still fsyncing while holding the write lock when we cut a new
segment. Given we cannot do anything but logging errors, we might just
as well complete segments asynchronously.

There's not realistic use case where one would fsync after every WAL
entry, thus make the default of a flush interval of 0 to never fsync
which is a much more likely use case.
2017-09-08 18:41:12 +02:00
Fabian Reinartz c36d574290 Replace single head lock with granular locks
This adds various new locks to replace the single big lock on
the head. All parts now must be COW as they may be held by clients
after initial retrieval.
Series by ID and hashes are now held in a stripe lock to reduce
contention and total holding time during GC. This should reduce
starvation of readers.
2017-09-05 14:41:39 +02:00
Fabian Reinartz 3951d8cc29 Fix selection of compactable blocks 2017-08-04 12:02:34 +02:00
Fabian Reinartz 9c4235532e Fix compaction selection after creating new heads
This fixes the case where between block creations no compaction
plans are ran. We were not compacting anything in these
cases since the on creation the most recent head block always had
a high timestamp of 0.
2017-07-13 16:15:13 +02:00
Goutham Veeramachaneni 9a2ab732b5 Choose ranges by retention and min-block-duration
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-07-12 17:30:34 +02:00
Fabian Reinartz 05e411a8eb Improve heuristic to spread chunks across block 2017-06-08 11:30:32 +02:00
Fabian Reinartz 39df7e2bba Switch blocks to ULID directories, drop sequenc numbers 2017-05-18 16:09:30 +02:00
Fabian Reinartz 285bc07030 Switch append refs to string 2017-05-18 10:56:57 +02:00
Fabian Reinartz c8438cfc81 Add mutex profiling to benchmark 2017-05-14 11:51:56 +02:00
Fabian Reinartz 778103b450 Add liecence file and headers 2017-04-10 20:59:45 +02:00
Fabian Reinartz 10c7c9acbe Adjust import names to new repository organisation 2017-04-04 11:27:26 +02:00
Goutham Veeramachaneni 761e4768f3
Lint and Vet Fixes 2017-03-19 21:35:01 +05:30
Fabian Reinartz 87805fb83f Remove Partitioned* code 2017-03-06 17:34:49 +01:00
Fabian Reinartz cc0a7c8279 Create alloc and inuse space heap profile 2017-03-02 21:54:30 +01:00
Fabian Reinartz ffb24a98f4 Add missing unlock, run debug endpoint in benchmark 2017-03-02 21:54:02 +01:00
Fabian Reinartz db5c88ea9a Misc compaction fixes 2017-02-28 08:40:51 +01:00
Fabian Reinartz b281e4e39b Accept prometheus.Registerer in constructor 2017-02-28 07:26:24 +01:00
Fabian Reinartz a3b47c4929 Create default logger for DB 2017-02-19 16:04:37 +01:00
Fabian Reinartz 9c7a88223e Add full encode/decode WAL cycle test 2017-02-14 21:55:50 -08:00
Fabian Reinartz 79944a5912 Break out WAL into segment files 2017-02-13 23:53:19 -08:00