round calculated updateFootprint values to two digits

This commit is contained in:
Christoph Kluge 2024-09-30 16:33:28 +02:00
parent c50e79375a
commit 218e56576a

View File

@ -74,14 +74,15 @@ func RegisterFootprintWorker() {
max = math.Max(max, series.Statistics.Max)
}
// Add values rounded to 2 digits
jobMeta.Statistics[metric] = schema.JobStatistics{
Unit: schema.Unit{
Prefix: archive.GetMetricConfig(job.Cluster, metric).Unit.Prefix,
Base: archive.GetMetricConfig(job.Cluster, metric).Unit.Base,
},
Avg: avg / float64(job.NumNodes),
Min: min,
Max: max,
Avg: (math.Round((avg/float64(job.NumNodes))*100) / 100),
Min: (math.Round(min*100) / 100),
Max: (math.Round(max*100) / 100),
}
}