mirror of
https://github.com/prometheus/prometheus.git
synced 2026-06-04 22:22:39 -04:00
Updates
This commit is contained in:
parent
a4e00cc2f8
commit
0e9c432bc4
3 changed files with 27 additions and 9 deletions
|
|
@ -1252,7 +1252,7 @@ func (t *test) clear() {
|
|||
if t.cancelCtx != nil {
|
||||
t.cancelCtx()
|
||||
}
|
||||
t.storage = teststorage.New(t)
|
||||
t.storage = teststorage.New(t, 24*time.Minute.Milliseconds())
|
||||
t.context, t.cancelCtx = context.WithCancel(context.Background())
|
||||
}
|
||||
|
||||
|
|
@ -1338,7 +1338,7 @@ func (ll *LazyLoader) clear() error {
|
|||
ll.cancelCtx()
|
||||
}
|
||||
var err error
|
||||
ll.storage, err = teststorage.NewWithError()
|
||||
ll.storage, err = teststorage.NewWithError(24 * time.Minute.Milliseconds())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
31
promql/promqltest/testdata/ooo.test
vendored
31
promql/promqltest/testdata/ooo.test
vendored
|
|
@ -1,11 +1,28 @@
|
|||
# OOO samples
|
||||
# OOO float samples
|
||||
|
||||
load 30s 150
|
||||
http_requests{path="/foo"} 1 2 3 4 8 9
|
||||
#load 30s 150
|
||||
# http_requests{path="/foo"} 1 2 3 4 8 9
|
||||
|
||||
load 30s 0
|
||||
http_requests{path="/foo"} 1 2 3 0 1
|
||||
#load 30s 0
|
||||
# http_requests{path="/foo"} 1 2 3 0 1
|
||||
|
||||
eval range from 0 to 5m step 30s sum by (path) (http_requests)
|
||||
{path="/foo"} 1 2 3 0 1 1 2 3 4 5
|
||||
#eval range from 0 to 5m step 30s sum by (path) (http_requests)
|
||||
# {path="/foo"} 1 2 3 0 1 1 2 3 4 5
|
||||
|
||||
### OOO Native Histogram samples
|
||||
|
||||
#
|
||||
load 1s 1
|
||||
ooo_histograms {{schema:0 sum:50 count:40 buckets:[10 20 10]}}
|
||||
|
||||
load 1s 4
|
||||
ooo_histograms {{schema:0 sum:50 count:30 buckets:[10 10 10]}}
|
||||
|
||||
load 1s 2
|
||||
ooo_histograms {{schema:0 sum:50 count:40 buckets:[10 20 10]}}
|
||||
|
||||
load 1s 3
|
||||
ooo_histograms {{schema:0 sum:10 count:10 buckets:[4 2 4]}}
|
||||
|
||||
eval instant at 5s histogram_count(rate(ooo_histograms[5s]))
|
||||
{} {{schema:-53 sum:1 count:1 custom_values:[5 10] buckets:[1]}}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ func NewWithError(outOfOrderTimeWindow ...int64) (*TestStorage, error) {
|
|||
opts.MaxBlockDuration = int64(24 * time.Hour / time.Millisecond)
|
||||
opts.RetentionDuration = 0
|
||||
opts.EnableNativeHistograms = true
|
||||
opts.EnableOOONativeHistograms = true
|
||||
|
||||
// Set OutOfOrderTimeWindow if provided, otherwise use default (0)
|
||||
if len(outOfOrderTimeWindow) > 0 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue