Aggr lanteness (#611)
* aggr lateness * default value * test * test Co-authored-by: alickliming <alickliming@didiglobal.com>
This commit is contained in:
parent
398628870c
commit
7a84223d5b
|
@ -18,6 +18,7 @@ import (
|
|||
|
||||
type AggrSection struct {
|
||||
Enabled bool `yaml:"enabled"`
|
||||
Lateness int `yaml:"lateness"`
|
||||
ApiPath string `yaml:"apiPath"`
|
||||
ApiTimeout int `yaml:"apiTimeout"`
|
||||
UpdateInterval int `yaml:"updateInterval"`
|
||||
|
@ -131,6 +132,11 @@ func transPoints(item *dataobj.MetricValue, strategys []*dataobj.RawMetricAggrCa
|
|||
|
||||
result.Hash = murmur3.Sum64([]byte(hash)) / 2
|
||||
|
||||
lateness := AggrConfig.Lateness
|
||||
if lateness == 0 {
|
||||
lateness = 60
|
||||
}
|
||||
|
||||
for _, rule := range strategys {
|
||||
ruleValid := true
|
||||
|
||||
|
@ -155,8 +161,6 @@ func transPoints(item *dataobj.MetricValue, strategys []*dataobj.RawMetricAggrCa
|
|||
step = int(item.Step) // 如果没有指定step,则默认和point的step相同
|
||||
}
|
||||
|
||||
lateness := step * 3
|
||||
|
||||
result.Strategys = append(result.Strategys, &dataobj.AggrCalcStra{
|
||||
SID: rule.Sid,
|
||||
NID: strconv.FormatInt(rule.Nid, 10),
|
||||
|
|
Loading…
Reference in New Issue