mirror of
				https://github.com/ClusterCockpit/cc-backend
				synced 2025-10-30 15:45:05 +01:00 
			
		
		
		
	round calculated updateFootprint values to two digits
This commit is contained in:
		| @@ -74,14 +74,15 @@ func RegisterFootprintWorker() { | |||||||
| 								max = math.Max(max, series.Statistics.Max) | 								max = math.Max(max, series.Statistics.Max) | ||||||
| 							} | 							} | ||||||
|  |  | ||||||
|  | 							// Add values rounded to 2 digits | ||||||
| 							jobMeta.Statistics[metric] = schema.JobStatistics{ | 							jobMeta.Statistics[metric] = schema.JobStatistics{ | ||||||
| 								Unit: schema.Unit{ | 								Unit: schema.Unit{ | ||||||
| 									Prefix: archive.GetMetricConfig(job.Cluster, metric).Unit.Prefix, | 									Prefix: archive.GetMetricConfig(job.Cluster, metric).Unit.Prefix, | ||||||
| 									Base:   archive.GetMetricConfig(job.Cluster, metric).Unit.Base, | 									Base:   archive.GetMetricConfig(job.Cluster, metric).Unit.Base, | ||||||
| 								}, | 								}, | ||||||
| 								Avg: avg / float64(job.NumNodes), | 								Avg: (math.Round((avg/float64(job.NumNodes))*100) / 100), | ||||||
| 								Min: min, | 								Min: (math.Round(min*100) / 100), | ||||||
| 								Max: max, | 								Max: (math.Round(max*100) / 100), | ||||||
| 							} | 							} | ||||||
| 						} | 						} | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user