mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-03-03 21:45:55 +01:00
Merge branch 'dev' of https://github.com/ClusterCockpit/cc-backend into dev
This commit is contained in:
commit
b731395689
@ -170,6 +170,9 @@ func LoadData(job *schema.Job,
|
|||||||
jd.AddNodeScope("mem_bw")
|
jd.AddNodeScope("mem_bw")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Round Resulting Stat Values
|
||||||
|
jd.RoundMetricStats()
|
||||||
|
|
||||||
return jd, ttl, size
|
return jd, ttl, size
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -291,6 +291,21 @@ func (jd *JobData) AddNodeScope(metric string) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (jd *JobData) RoundMetricStats() {
|
||||||
|
// TODO: Make Digit-Precision Configurable? (Currently: Fixed to 2 Digits)
|
||||||
|
for _, scopes := range *jd {
|
||||||
|
for _, jm := range scopes {
|
||||||
|
for index := range jm.Series {
|
||||||
|
jm.Series[index].Statistics = MetricStatistics{
|
||||||
|
Avg: (math.Round(jm.Series[index].Statistics.Avg*100) / 100),
|
||||||
|
Min: (math.Round(jm.Series[index].Statistics.Min*100) / 100),
|
||||||
|
Max: (math.Round(jm.Series[index].Statistics.Max*100) / 100),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (jm *JobMetric) AddPercentiles(ps []int) bool {
|
func (jm *JobMetric) AddPercentiles(ps []int) bool {
|
||||||
if jm.StatisticsSeries == nil {
|
if jm.StatisticsSeries == nil {
|
||||||
jm.AddStatisticsSeries()
|
jm.AddStatisticsSeries()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user