|
|
@ -755,7 +755,7 @@ load 10s
|
|
|
|
metricWith3SampleEvery10Seconds{a="1",b="1"} 1+1x100
|
|
|
|
metricWith3SampleEvery10Seconds{a="1",b="1"} 1+1x100
|
|
|
|
metricWith3SampleEvery10Seconds{a="2",b="2"} 1+1x100
|
|
|
|
metricWith3SampleEvery10Seconds{a="2",b="2"} 1+1x100
|
|
|
|
metricWith3SampleEvery10Seconds{a="3",b="2"} 1+1x100
|
|
|
|
metricWith3SampleEvery10Seconds{a="3",b="2"} 1+1x100
|
|
|
|
metricWith1HistogramsEvery10Seconds {{schema:1 count:5 sum:20 buckets:[1 2 1 1]}}+{{schema:1 count:10 sum:5 buckets:[1 2 3 4]}}x100
|
|
|
|
metricWith1HistogramEvery10Seconds {{schema:1 count:5 sum:20 buckets:[1 2 1 1]}}+{{schema:1 count:10 sum:5 buckets:[1 2 3 4]}}x100
|
|
|
|
`)
|
|
|
|
`)
|
|
|
|
t.Cleanup(func() { storage.Close() })
|
|
|
|
t.Cleanup(func() { storage.Close() })
|
|
|
|
|
|
|
|
|
|
|
@ -799,10 +799,10 @@ load 10s
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Query: "metricWith1HistogramEvery10Seconds",
|
|
|
|
Query: "metricWith1HistogramEvery10Seconds",
|
|
|
|
Start: time.Unix(21, 0),
|
|
|
|
Start: time.Unix(21, 0),
|
|
|
|
PeakSamples: 1,
|
|
|
|
PeakSamples: 12,
|
|
|
|
TotalSamples: 1, // 1 sample / 10 seconds
|
|
|
|
TotalSamples: 12, // 1 histogram sample of size 12 / 10 seconds
|
|
|
|
TotalSamplesPerStep: stats.TotalSamplesPerStep{
|
|
|
|
TotalSamplesPerStep: stats.TotalSamplesPerStep{
|
|
|
|
21000: 1,
|
|
|
|
21000: 12,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -815,6 +815,15 @@ load 10s
|
|
|
|
21000: 1,
|
|
|
|
21000: 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Query: "timestamp(metricWith1HistogramEvery10Seconds)",
|
|
|
|
|
|
|
|
Start: time.Unix(21, 0),
|
|
|
|
|
|
|
|
PeakSamples: 13, // histogram size 12 + 1 extra because of timestamp
|
|
|
|
|
|
|
|
TotalSamples: 1, // 1 float sample (because of timestamp) / 10 seconds
|
|
|
|
|
|
|
|
TotalSamplesPerStep: stats.TotalSamplesPerStep{
|
|
|
|
|
|
|
|
21000: 1,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Query: "metricWith1SampleEvery10Seconds",
|
|
|
|
Query: "metricWith1SampleEvery10Seconds",
|
|
|
|
Start: time.Unix(22, 0),
|
|
|
|
Start: time.Unix(22, 0),
|
|
|
@ -887,11 +896,20 @@ load 10s
|
|
|
|
201000: 6,
|
|
|
|
201000: 6,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Query: "metricWith1HistogramEvery10Seconds[60s]",
|
|
|
|
|
|
|
|
Start: time.Unix(201, 0),
|
|
|
|
|
|
|
|
PeakSamples: 72,
|
|
|
|
|
|
|
|
TotalSamples: 72, // 1 histogram (size 12) / 10 seconds * 60 seconds
|
|
|
|
|
|
|
|
TotalSamplesPerStep: stats.TotalSamplesPerStep{
|
|
|
|
|
|
|
|
201000: 72,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Query: "max_over_time(metricWith1SampleEvery10Seconds[59s])[20s:5s]",
|
|
|
|
Query: "max_over_time(metricWith1SampleEvery10Seconds[59s])[20s:5s]",
|
|
|
|
Start: time.Unix(201, 0),
|
|
|
|
Start: time.Unix(201, 0),
|
|
|
|
PeakSamples: 10,
|
|
|
|
PeakSamples: 10,
|
|
|
|
TotalSamples: 24, // (1 sample / 10 seconds * 60 seconds) * 60/5 (using 59s so we always return 6 samples
|
|
|
|
TotalSamples: 24, // (1 sample / 10 seconds * 60 seconds) * 20/5 (using 59s so we always return 6 samples
|
|
|
|
// as if we run a query on 00 looking back 60 seconds we will return 7 samples;
|
|
|
|
// as if we run a query on 00 looking back 60 seconds we will return 7 samples;
|
|
|
|
// see next test).
|
|
|
|
// see next test).
|
|
|
|
TotalSamplesPerStep: stats.TotalSamplesPerStep{
|
|
|
|
TotalSamplesPerStep: stats.TotalSamplesPerStep{
|
|
|
@ -902,12 +920,22 @@ load 10s
|
|
|
|
Query: "max_over_time(metricWith1SampleEvery10Seconds[60s])[20s:5s]",
|
|
|
|
Query: "max_over_time(metricWith1SampleEvery10Seconds[60s])[20s:5s]",
|
|
|
|
Start: time.Unix(201, 0),
|
|
|
|
Start: time.Unix(201, 0),
|
|
|
|
PeakSamples: 11,
|
|
|
|
PeakSamples: 11,
|
|
|
|
TotalSamples: 26, // (1 sample / 10 seconds * 60 seconds) + 2 as
|
|
|
|
TotalSamples: 26, // (1 sample / 10 seconds * 60 seconds) * 4 + 2 as
|
|
|
|
// max_over_time(metricWith1SampleEvery10Seconds[60s]) @ 190 and 200 will return 7 samples.
|
|
|
|
// max_over_time(metricWith1SampleEvery10Seconds[60s]) @ 190 and 200 will return 7 samples.
|
|
|
|
TotalSamplesPerStep: stats.TotalSamplesPerStep{
|
|
|
|
TotalSamplesPerStep: stats.TotalSamplesPerStep{
|
|
|
|
201000: 26,
|
|
|
|
201000: 26,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Query: "max_over_time(metricWith1HistogramEvery10Seconds[60s])[20s:5s]",
|
|
|
|
|
|
|
|
Start: time.Unix(201, 0),
|
|
|
|
|
|
|
|
PeakSamples: 72,
|
|
|
|
|
|
|
|
TotalSamples: 312, // (1 histogram (size 12) / 10 seconds * 60 seconds) * 4 + 2 * 12 as
|
|
|
|
|
|
|
|
// max_over_time(metricWith1SampleEvery10Seconds[60s]) @ 190 and 200 will return 7 samples.
|
|
|
|
|
|
|
|
TotalSamplesPerStep: stats.TotalSamplesPerStep{
|
|
|
|
|
|
|
|
201000: 312,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Query: "metricWith1SampleEvery10Seconds[60s] @ 30",
|
|
|
|
Query: "metricWith1SampleEvery10Seconds[60s] @ 30",
|
|
|
|
Start: time.Unix(201, 0),
|
|
|
|
Start: time.Unix(201, 0),
|
|
|
@ -917,6 +945,15 @@ load 10s
|
|
|
|
201000: 4,
|
|
|
|
201000: 4,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Query: "metricWith1HistogramEvery10Seconds[60s] @ 30",
|
|
|
|
|
|
|
|
Start: time.Unix(201, 0),
|
|
|
|
|
|
|
|
PeakSamples: 48,
|
|
|
|
|
|
|
|
TotalSamples: 48, // @ modifier force the evaluation to at 30 seconds - So it brings 4 datapoints (0, 10, 20, 30 seconds) * 1 series
|
|
|
|
|
|
|
|
TotalSamplesPerStep: stats.TotalSamplesPerStep{
|
|
|
|
|
|
|
|
201000: 48,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Query: "sum(max_over_time(metricWith3SampleEvery10Seconds[60s] @ 30))",
|
|
|
|
Query: "sum(max_over_time(metricWith3SampleEvery10Seconds[60s] @ 30))",
|
|
|
|
Start: time.Unix(201, 0),
|
|
|
|
Start: time.Unix(201, 0),
|
|
|
@ -1045,7 +1082,21 @@ load 10s
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// timestamp function as a special handling
|
|
|
|
Query: `metricWith1HistogramEvery10Seconds`,
|
|
|
|
|
|
|
|
Start: time.Unix(204, 0),
|
|
|
|
|
|
|
|
End: time.Unix(223, 0),
|
|
|
|
|
|
|
|
Interval: 5 * time.Second,
|
|
|
|
|
|
|
|
PeakSamples: 48,
|
|
|
|
|
|
|
|
TotalSamples: 48, // 1 histogram (size 12) per query * 4 steps
|
|
|
|
|
|
|
|
TotalSamplesPerStep: stats.TotalSamplesPerStep{
|
|
|
|
|
|
|
|
204000: 12, // aligned to the step time, not the sample time
|
|
|
|
|
|
|
|
209000: 12,
|
|
|
|
|
|
|
|
214000: 12,
|
|
|
|
|
|
|
|
219000: 12,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// timestamp function has a special handling
|
|
|
|
Query: "timestamp(metricWith1SampleEvery10Seconds)",
|
|
|
|
Query: "timestamp(metricWith1SampleEvery10Seconds)",
|
|
|
|
Start: time.Unix(201, 0),
|
|
|
|
Start: time.Unix(201, 0),
|
|
|
|
End: time.Unix(220, 0),
|
|
|
|
End: time.Unix(220, 0),
|
|
|
@ -1059,6 +1110,21 @@ load 10s
|
|
|
|
216000: 1,
|
|
|
|
216000: 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// timestamp function has a special handling
|
|
|
|
|
|
|
|
Query: "timestamp(metricWith1HistogramEvery10Seconds)",
|
|
|
|
|
|
|
|
Start: time.Unix(201, 0),
|
|
|
|
|
|
|
|
End: time.Unix(220, 0),
|
|
|
|
|
|
|
|
Interval: 5 * time.Second,
|
|
|
|
|
|
|
|
PeakSamples: 16,
|
|
|
|
|
|
|
|
TotalSamples: 4, // 1 sample per query * 4 steps
|
|
|
|
|
|
|
|
TotalSamplesPerStep: stats.TotalSamplesPerStep{
|
|
|
|
|
|
|
|
201000: 1,
|
|
|
|
|
|
|
|
206000: 1,
|
|
|
|
|
|
|
|
211000: 1,
|
|
|
|
|
|
|
|
216000: 1,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Query: `max_over_time(metricWith3SampleEvery10Seconds{a="1"}[10s])`,
|
|
|
|
Query: `max_over_time(metricWith3SampleEvery10Seconds{a="1"}[10s])`,
|
|
|
|
Start: time.Unix(991, 0),
|
|
|
|
Start: time.Unix(991, 0),
|
|
|
|