Skip to content

Commit

Permalink
[query] Update histograms.test based on new Prometheus release (#2488)
Browse files Browse the repository at this point in the history
  • Loading branch information
linasm authored Jul 24, 2020
1 parent 5e40989 commit 82a9d32
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 104 deletions.
93 changes: 0 additions & 93 deletions scripts/comparator/regression_data/non_monotonic_buckets.json

This file was deleted.

25 changes: 14 additions & 11 deletions src/query/test/compatibility/testdata/histograms.test
Original file line number Diff line number Diff line change
Expand Up @@ -151,22 +151,25 @@ eval instant at 50m histogram_quantile(0.5, rate(request_duration_seconds_bucket

# A histogram with nonmonotonic bucket counts. This may happen when recording
# rule evaluation or federation races scrape ingestion, causing some buckets
# counts to be derived from fewer samples. The wrong answer we want to avoid
# is for histogram_quantile(0.99, nonmonotonic_bucket) to return ~1000 instead
# of 1.
# counts to be derived from fewer samples.

load 5m
nonmonotonic_bucket{le="0.1"} 0+1x10
nonmonotonic_bucket{le="1"} 0+9x10
nonmonotonic_bucket{le="10"} 0+8x10
nonmonotonic_bucket{le="100"} 0+8x10
nonmonotonic_bucket{le="0.1"} 0+2x10
nonmonotonic_bucket{le="1"} 0+1x10
nonmonotonic_bucket{le="10"} 0+5x10
nonmonotonic_bucket{le="100"} 0+4x10
nonmonotonic_bucket{le="1000"} 0+9x10
nonmonotonic_bucket{le="+Inf"} 0+9x10
nonmonotonic_bucket{le="+Inf"} 0+8x10

# Nonmonotonic buckets
# TODO - enable after https://github.com/prometheus/prometheus/commit/7eaffa71802821087c8ee42dbda652453ec1f867 is released:
# eval instant at 50m histogram_quantile(0.99, nonmonotonic_bucket)
# {} 0.989875
eval instant at 50m histogram_quantile(0.01, nonmonotonic_bucket)
{} 0.0045

eval instant at 50m histogram_quantile(0.5, nonmonotonic_bucket)
{} 8.5

eval instant at 50m histogram_quantile(0.99, nonmonotonic_bucket)
{} 979.75

# FAILING issue #48. Buckets with different representations of the same upper bound.
# eval instant at 50m histogram_quantile(0.5, rate(mixed_bucket[5m]))
Expand Down

0 comments on commit 82a9d32

Please sign in to comment.