Commit graph

7758 commits

Author SHA1 Message Date
Bartlomiej Plotka c4e74e241f
Merge pull request #6744 from slrtbtfs/split_parser
Split promql package into parser and engine
2020-02-25 16:49:19 +00:00
Tobias Guggenmos a56a057dc9 Empty commit to trigger CI
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
2020-02-25 15:00:20 +01:00
Mathilde Gilles 9b9c58aea8
[Consul] Add health label to metrics (#5313)
Label metrics with the target health using consul's /health endpoint.

Signed-off-by: Mathilde Gilles <m.gilles@criteo.com>
2020-02-25 13:32:30 +00:00
Tobias Guggenmos 3d74fcfa6a Bartek's suggestions
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
2020-02-25 13:57:30 +01:00
Julien Pivotto 202813a654
Merge pull request #6867 from pracucci/enhance-ulid-entropy-generator
Use a cryptographically secure random generator for ULID
2020-02-25 13:47:50 +01:00
Bartlomiej Plotka c869e046a5
Merge pull request #6840 from pstibrany/context_from_request_should_not_return_error
Don't return error in ContextFromRequest function.
2020-02-25 12:39:46 +00:00
Marco Pracucci c391b6ca43
Use a cryptographically random generator for ULID
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2020-02-25 12:12:03 +01:00
Julien Pivotto b38ee4496b
Merge pull request #6834 from roidelapluie/vendor
Update vendors
2020-02-25 11:30:36 +01:00
Frederic Branczyk d06f1034db discovery/kubernetes: Fix race in test setup
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
2020-02-25 10:33:41 +01:00
Julien Pivotto ef63d8d16d Update vendors
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-02-25 10:33:41 +01:00
李国忠 029b45aa30
add service type metadata to kubernetes_sd_config service role #6496 (#6684)
* [service discovery] add service type metadata to kubernetes_sd_config service role

Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>

* [fix] ServiceType -> string

Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>

* [fix] fix testcase

Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>

* [style]

Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>

* [doc] add service type

Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>

* [doc] sort

Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>
2020-02-25 09:22:14 +01:00
Tobias Guggenmos f9db320e5a Look up function call in all cases
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
2020-02-24 13:45:03 +01:00
Simon Pasquier 46129fdebb
Makefile.common: use gotestsum if present (#4792)
Using gotestsum with CircleCI, we can gain more insights on failing
tests.

See https://circleci.com/docs/2.0/collect-test-data/ and
https://circleci.com/blog/level-up-go-test-with-gotestsum/ for more
details.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-02-24 11:50:05 +01:00
李国忠 f7a322fa6d
[comments] change the word "liike" to "like" (#6859)
Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>
2020-02-22 20:48:54 +00:00
Bartlomiej Plotka 91ddd67c67
Merge pull request #6819 from cstyan/update-release-doc
Re-arrange contents of RELEASE.md to clarify ordering of steps
2020-02-22 07:27:08 +00:00
Callum Styan 53aa2541e5 Simplify tagging section to reduce chance of misinterpreting what the
tag should be.

Signed-off-by: Callum Styan <callumstyan@gmail.com>
2020-02-21 09:31:49 -08:00
Julien Pivotto fdbb18b445
Merge pull request #6676 from roidelapluie/postings
Make head Postings only return series in time range
2020-02-21 14:55:44 +01:00
Tobias Guggenmos 9ebf6bd1e6 Remove superfluous blank lines
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
2020-02-21 13:36:57 +01:00
Tobias Guggenmos 7143d64fc1
Julien's suggestion
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>

Co-Authored-By: Julien Pivotto <roidelapluie@gmail.com>
2020-02-21 13:34:15 +01:00
Tobias Guggenmos 4124828c00 Add test to check that promql.FunctionCalls and parser.Functions contain the same functions
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
2020-02-21 12:43:30 +01:00
Frederic Branczyk 20a94e62ca
Merge pull request #6843 from simonpasquier/simplify-send-func
discovery/kubernetes: remove extraneous parameters from send()
2020-02-21 11:23:29 +01:00
Julien Pivotto 52630ad0c7 Make head Postings only return series in time range
benchmark                                                old ns/op      new ns/op      delta
BenchmarkQuerierSelect/Head/1of1000000-8                 405805161      120436132      -70.32%
BenchmarkQuerierSelect/Head/10of1000000-8                403079620      120624292      -70.07%
BenchmarkQuerierSelect/Head/100of1000000-8               404678647      120923522      -70.12%
BenchmarkQuerierSelect/Head/1000of1000000-8              403145813      118636563      -70.57%
BenchmarkQuerierSelect/Head/10000of1000000-8             405020046      125716206      -68.96%
BenchmarkQuerierSelect/Head/100000of1000000-8            426305002      175808499      -58.76%
BenchmarkQuerierSelect/Head/1000000of1000000-8           619002108      567013003      -8.40%
BenchmarkQuerierSelect/SortedHead/1of1000000-8           1276316086     120281094      -90.58%
BenchmarkQuerierSelect/SortedHead/10of1000000-8          1282631170     121836526      -90.50%
BenchmarkQuerierSelect/SortedHead/100of1000000-8         1325824787     121174967      -90.86%
BenchmarkQuerierSelect/SortedHead/1000of1000000-8        1271386268     121025117      -90.48%
BenchmarkQuerierSelect/SortedHead/10000of1000000-8       1280223345     130838948      -89.78%
BenchmarkQuerierSelect/SortedHead/100000of1000000-8      1271401620     243635515      -80.84%
BenchmarkQuerierSelect/SortedHead/1000000of1000000-8     1360256090     1307744674     -3.86%
BenchmarkQuerierSelect/Block/1of1000000-8                748183120      707888498      -5.39%
BenchmarkQuerierSelect/Block/10of1000000-8               741084129      716317249      -3.34%
BenchmarkQuerierSelect/Block/100of1000000-8              722157273      735624256      +1.86%
BenchmarkQuerierSelect/Block/1000of1000000-8             727587744      731981838      +0.60%
BenchmarkQuerierSelect/Block/10000of1000000-8            727518578      726860308      -0.09%
BenchmarkQuerierSelect/Block/100000of1000000-8           765577046      757382386      -1.07%
BenchmarkQuerierSelect/Block/1000000of1000000-8          1126722881     1084779083     -3.72%

benchmark                                                old allocs     new allocs     delta
BenchmarkQuerierSelect/Head/1of1000000-8                 4000018        24             -100.00%
BenchmarkQuerierSelect/Head/10of1000000-8                4000036        82             -100.00%
BenchmarkQuerierSelect/Head/100of1000000-8               4000216        625            -99.98%
BenchmarkQuerierSelect/Head/1000of1000000-8              4002016        6028           -99.85%
BenchmarkQuerierSelect/Head/10000of1000000-8             4020016        60037          -98.51%
BenchmarkQuerierSelect/Head/100000of1000000-8            4200016        600047         -85.71%
BenchmarkQuerierSelect/Head/1000000of1000000-8           6000016        6000016        +0.00%
BenchmarkQuerierSelect/SortedHead/1of1000000-8           4000055        28             -100.00%
BenchmarkQuerierSelect/SortedHead/10of1000000-8          4000073        87             -100.00%
BenchmarkQuerierSelect/SortedHead/100of1000000-8         4000253        630            -99.98%
BenchmarkQuerierSelect/SortedHead/1000of1000000-8        4002053        6036           -99.85%
BenchmarkQuerierSelect/SortedHead/10000of1000000-8       4020053        60054          -98.51%
BenchmarkQuerierSelect/SortedHead/100000of1000000-8      4200053        600074         -85.71%
BenchmarkQuerierSelect/SortedHead/1000000of1000000-8     6000053        6000053        +0.00%
BenchmarkQuerierSelect/Block/1of1000000-8                6000021        6000021        +0.00%
BenchmarkQuerierSelect/Block/10of1000000-8               6000057        6000057        +0.00%
BenchmarkQuerierSelect/Block/100of1000000-8              6000417        6000417        +0.00%
BenchmarkQuerierSelect/Block/1000of1000000-8             6004017        6004017        +0.00%
BenchmarkQuerierSelect/Block/10000of1000000-8            6040017        6040017        +0.00%
BenchmarkQuerierSelect/Block/100000of1000000-8           6400017        6400017        +0.00%
BenchmarkQuerierSelect/Block/1000000of1000000-8          10000018       10000018       +0.00%

benchmark                                                old bytes     new bytes     delta
BenchmarkQuerierSelect/Head/1of1000000-8                 176001177     1392          -100.00%
BenchmarkQuerierSelect/Head/10of1000000-8                176002329     4368          -100.00%
BenchmarkQuerierSelect/Head/100of1000000-8               176013849     33520         -99.98%
BenchmarkQuerierSelect/Head/1000of1000000-8              176129056     321456        -99.82%
BenchmarkQuerierSelect/Head/10000of1000000-8             177281049     3427376       -98.07%
BenchmarkQuerierSelect/Head/100000of1000000-8            188801049     35055408      -81.43%
BenchmarkQuerierSelect/Head/1000000of1000000-8           304001059     304001049     -0.00%
BenchmarkQuerierSelect/SortedHead/1of1000000-8           229192188     2488          -100.00%
BenchmarkQuerierSelect/SortedHead/10of1000000-8          229193340     5568          -100.00%
BenchmarkQuerierSelect/SortedHead/100of1000000-8         229204860     35536         -99.98%
BenchmarkQuerierSelect/SortedHead/1000of1000000-8        229320060     345104        -99.85%
BenchmarkQuerierSelect/SortedHead/10000of1000000-8       230472060     3894672       -98.31%
BenchmarkQuerierSelect/SortedHead/100000of1000000-8      241992060     40511632      -83.26%
BenchmarkQuerierSelect/SortedHead/1000000of1000000-8     357192060     357192060     +0.00%
BenchmarkQuerierSelect/Block/1of1000000-8                227201516     227201506     -0.00%
BenchmarkQuerierSelect/Block/10of1000000-8               227203057     227203041     -0.00%
BenchmarkQuerierSelect/Block/100of1000000-8              227217161     227217165     +0.00%
BenchmarkQuerierSelect/Block/1000of1000000-8             227358279     227358289     +0.00%
BenchmarkQuerierSelect/Block/10000of1000000-8            228769485     228769475     -0.00%
BenchmarkQuerierSelect/Block/100000of1000000-8           242881487     242881477     -0.00%
BenchmarkQuerierSelect/Block/1000000of1000000-8          384001705     384001705     +0.00%

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-02-20 22:41:46 +01:00
Brian Brazil cebe36c7d5 Make head Postings only return series in time range
Series() will fetch all the metadata for a series,
even if it's going to be filtered later due to time ranges.

For 1M series we save ~1.1s if you only needed some of the data, but take an
extra ~.2s if you did want everything.

benchmark                                  old ns/op      new ns/op      delta
BenchmarkHeadSeries/1of1000000-4           1443715987     131553480      -90.89%
BenchmarkHeadSeries/10of1000000-4          1433394040     130730596      -90.88%
BenchmarkHeadSeries/100of1000000-4         1437444672     131360813      -90.86%
BenchmarkHeadSeries/1000of1000000-4        1438958659     132573137      -90.79%
BenchmarkHeadSeries/10000of1000000-4       1438061766     145742377      -89.87%
BenchmarkHeadSeries/100000of1000000-4      1455060948     281659416      -80.64%
BenchmarkHeadSeries/1000000of1000000-4     1633524504     1803550153     +10.41%

benchmark                                  old allocs     new allocs     delta
BenchmarkHeadSeries/1of1000000-4           4000055        28             -100.00%
BenchmarkHeadSeries/10of1000000-4          4000073        87             -100.00%
BenchmarkHeadSeries/100of1000000-4         4000253        630            -99.98%
BenchmarkHeadSeries/1000of1000000-4        4002053        6036           -99.85%
BenchmarkHeadSeries/10000of1000000-4       4020053        60054          -98.51%
BenchmarkHeadSeries/100000of1000000-4      4200053        600074         -85.71%
BenchmarkHeadSeries/1000000of1000000-4     6000053        6000094        +0.00%

benchmark                                  old bytes     new bytes     delta
BenchmarkHeadSeries/1of1000000-4           229192184     2488          -100.00%
BenchmarkHeadSeries/10of1000000-4          229193336     5568          -100.00%
BenchmarkHeadSeries/100of1000000-4         229204856     35536         -99.98%
BenchmarkHeadSeries/1000of1000000-4        229320056     345104        -99.85%
BenchmarkHeadSeries/10000of1000000-4       230472056     3894673       -98.31%
BenchmarkHeadSeries/100000of1000000-4      241992056     40511632      -83.26%
BenchmarkHeadSeries/1000000of1000000-4     357192056     402380440     +12.65%

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-02-20 22:18:42 +01:00
Boqin Qin 0e51cf65e7
scrape_test: fix send-to-closed-channel bugs (#6849)
Signed-off-by: BurtonQin <bobbqqin@gmail.com>
2020-02-20 13:40:25 +00:00
李国忠 d276b5fb65
[format]Js: format checktimedrift() success (#6850)
Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>
2020-02-20 11:36:22 +01:00
Callum Styan 6ad7ec50f7 Clarify branch naming/not creating release-x branches for patch/RC.
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2020-02-19 10:35:34 -08:00
Tobias Guggenmos 4835bbf376
Merge branch 'master' into split_parser 2020-02-19 15:18:13 +01:00
Guangwen Feng 87971fff90
Add unit test for func WithoutEmpty in labels.go (#6848)
Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
2020-02-19 11:56:12 +00:00
Hrishikesh Barman c53bf31406
Renamed prombench git repo with test-infra (#6847)
Signed-off-by: Hrishikesh Barman <plain.hrishikeshbman@gmail.com>
2020-02-19 13:39:08 +02:00
Peter Štibraný a7d3a456d6 Updated code based on Juliens comments (via Slack).
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
2020-02-19 11:57:20 +01:00
Guangwen Feng 14182c1420
Fix golint warning in labels.go (#6839)
Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
2020-02-19 07:25:44 +01:00
Peter Štibraný fe3fe5740e Updated comment.
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
2020-02-18 21:50:47 +01:00
Callum Styan b4fb97d8b6 Clarify release branch conditions and pre-release relase step on GH UI
based on Bjorn's review.

Signed-off-by: Callum Styan <callumstyan@gmail.com>
2020-02-18 12:42:52 -08:00
Julien Pivotto a188b1e91b
Mark pull request as stale after 60d of inactivity (#6826)
During the dev Summit 2019/2, there was a consensus to mark stale PR
after 60 days.

This change is adding the stale bot configuration required for this.
The stale bot has already access to the Prometheus organization. It
does _not_ comment and does _not_ close the stale pull request. It just
adds a label 'stale'.

This is already done in the collectd_exporter repository and there it
works as expected.

https://docs.google.com/document/d/1VVxx9DzpJPDgOZpZ5TtSHBRPuG5Fr3Vr6EFh8XuUpgs/edit

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-02-18 20:00:48 +01:00
Bartlomiej Plotka 69880ff029
Merge pull request #6832 from roidelapluie/17
Volunteer roidelapluie as 2.17 release shepherd
2020-02-18 17:10:27 +00:00
Simon Pasquier 06c1a07d5a discovery/kubernetes: remove extraneous parameters from send()
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-02-18 17:36:57 +01:00
Peter Štibraný baa6f60384 Changed var name.
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
2020-02-18 16:24:09 +01:00
Peter Štibraný 318cd413fc Don't return error in ContextFromRequest function.
Previously it could return error if RemoteAddr didn't
have correct format, but since this field has no specified
format, that was little too strict.

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
2020-02-18 15:58:14 +01:00
Frederic Branczyk babcb86cd0
Merge pull request #6777 from prometheus/unify-interfaces
Import TSDB directly, without adapter; Unify Iterators, Querier, Series interfaces.
2020-02-18 14:51:31 +01:00
Bartlomiej Plotka 48ead578a0 Moved tsdbconfig to main.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-02-18 11:25:36 +00:00
Julien Pivotto b3415387cb Volunteer roidelapluie as 2.17 release shepherd
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-02-17 20:53:37 +01:00
Bartlomiej Plotka a20bebf7eb Moved readyStorage to main.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-02-17 18:03:57 +00:00
Bartlomiej Plotka 8a775bc468 Moved unit agnostic options to separate pkg.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-02-17 18:03:57 +00:00
Bartlomiej Plotka 59c9d6ef45 Addressed Brian's comments, moved metrics to main.go
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-02-17 18:03:57 +00:00
Bartlomiej Plotka 5d84e5d895 Make chunkenc.Iterator.At behaviour unspecified without Next done.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-02-17 18:03:57 +00:00
Bartlomiej Plotka ad51c649b5 Fixed float conversion difference.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-02-17 18:03:57 +00:00
Bartlomiej Plotka cfba92a133 Addressed comments.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-02-17 18:03:57 +00:00
Bartlomiej Plotka c0a9ab0829 Close db properly in tests.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-02-17 18:03:57 +00:00
Bartlomiej Plotka fb79f515fc Fixed second bug.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-02-17 18:03:57 +00:00
Bartlomiej Plotka aadffd1360 Finally found a fix for the bug I was chasing for 2h...
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-02-17 18:03:57 +00:00