diff --git a/go/exec/metrics/metrics.go b/go/exec/metrics/metrics.go index fc7f256d5..328727e3c 100644 --- a/go/exec/metrics/metrics.go +++ b/go/exec/metrics/metrics.go @@ -20,7 +20,6 @@ package metrics import ( "fmt" - "math" "strings" "github.com/vitessio/arewefastyet/go/storage" @@ -123,19 +122,19 @@ func NewExecMetrics() ExecutionMetrics { func InsertExecutionMetrics(client storage.SQLClient, execUUID string, execMetrics ExecutionMetrics) error { query := "INSERT INTO metrics(exec_uuid, `name`, `value`) VALUES (?, ?, ?), (?, ?, ?)" args := []interface{}{ - execUUID, "TotalComponentsCPUTime", math.Round(float64(int(execMetrics.TotalComponentsCPUTime*100))) / 100, - execUUID, "TotalComponentsMemStatsAllocBytes", math.Round(float64(int(execMetrics.TotalComponentsMemStatsAllocBytes*100))) / 100, + execUUID, "TotalComponentsCPUTime", execMetrics.TotalComponentsCPUTime, + execUUID, "TotalComponentsMemStatsAllocBytes", execMetrics.TotalComponentsMemStatsAllocBytes, } for k, v := range execMetrics.ComponentsCPUTime { query += ", (?,?,?)" args = append(args, []interface{}{ - execUUID, "ComponentsCPUTime." + k, math.Round(float64(int(v*100))) / 100, + execUUID, "ComponentsCPUTime." + k, v, }...) } for k, v := range execMetrics.ComponentsMemStatsAllocBytes { query += ", (?,?,?)" args = append(args, []interface{}{ - execUUID, "ComponentsMemStatsAllocBytes." + k, math.Round(float64(int(v*100))) / 100, + execUUID, "ComponentsMemStatsAllocBytes." + k, v, }...) } _, err := client.Insert(query, args...)