code refactor
This commit is contained in:
parent
0b4d1639c6
commit
4b3f11418e
|
@ -186,11 +186,6 @@ func SubtractToGauge(item *dataobj.MetricValue) *dataobj.MetricValue {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if old.Value > item.Value {
|
|
||||||
logger.Warningf("item:%v old value:%v greater than new value:%v", item, old.Value, item.Value)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if old.Timestamp >= item.Timestamp {
|
if old.Timestamp >= item.Timestamp {
|
||||||
logger.Warningf("item:%v old timestamp:%v greater than new timestamp:%v", item, old.Timestamp, item.Timestamp)
|
logger.Warningf("item:%v old timestamp:%v greater than new timestamp:%v", item, old.Timestamp, item.Timestamp)
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue