You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 23, 2023. It is now read-only.
Copy file name to clipboardexpand all lines: api/config.go
+4
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ import (
8
8
"time"
9
9
10
10
"github.com/grafana/globalconf"
11
+
"github.com/grafana/metrictank/expr"
11
12
log "github.com/sirupsen/logrus"
12
13
)
13
14
@@ -28,6 +29,7 @@ var (
28
29
getTargetsConcurrencyint
29
30
tagdbDefaultLimituint
30
31
speculationThresholdfloat64
32
+
optimizations expr.Optimizations
31
33
32
34
graphiteProxy*httputil.ReverseProxy
33
35
timeZone*time.Location
@@ -49,6 +51,8 @@ func ConfigSetup() {
49
51
apiCfg.IntVar(&getTargetsConcurrency, "get-targets-concurrency", 20, "maximum number of concurrent threads for fetching data on the local node. Each thread handles a single series.")
50
52
apiCfg.UintVar(&tagdbDefaultLimit, "tagdb-default-limit", 100, "default limit for tagdb query results, can be overridden with query parameter \"limit\"")
51
53
apiCfg.Float64Var(&speculationThreshold, "speculation-threshold", 1, "ratio of peer responses after which speculation is used. Set to 1 to disable.")
// if the series has some excess at the end, it may aggregate into a bucket with a timestamp out of the desired range.
768
774
// for example: imagine we take the case from above, and the user specified a `to` of 115.
769
775
// a native 30s series would end with point 90. We should not include any points that would go into an aggregation bucket with timestamp higher than 90.
770
-
// (such as 100 or 110 which would technically be allowed by the `to` specification)
776
+
// (such as 100 or 110 which would technically be allowed by the `to` specification but land in the bucket with ts=120 which is out of bounds)
771
777
// so the proper to value is the highest value that does not result in points going into an out-of-bounds bucket.
772
778
773
779
// example: for 10s data (note that the 2 last colums should always match!)
0 commit comments