do not math.Round for metric value

This commit is contained in:
Ulric Qin 2022-03-21 16:43:28 +08:00
parent 5a9b8d6bd0
commit 4a62339c69
2 changed files with 0 additions and 6 deletions

View File

@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
"math"
"strconv"
"strings"
"time"
@ -54,8 +53,6 @@ func (m *FalconMetric) Clean(ts int64) error {
return fmt.Errorf("unparseable value %v", v)
}
m.Value = math.Round(m.Value*100000) / 100000
// if timestamp bigger than 32 bits, likely in milliseconds
if m.Timestamp > 0xffffffff {
m.Timestamp /= 1000

View File

@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
"math"
"strconv"
"strings"
"time"
@ -54,8 +53,6 @@ func (m *HTTPMetric) Clean(ts int64) error {
return fmt.Errorf("unparseable value %v", v)
}
m.Value = math.Round(m.Value*100000) / 100000
// if timestamp bigger than 32 bits, likely in milliseconds
if m.Timestamp > 0xffffffff {
m.Timestamp /= 1000