mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 05:19:05 +01:00
commit
c7e49644d8
@ -35,3 +35,11 @@ For release specific notes visit the [ClusterCockpit Documentation](https://clus
|
|||||||
- A performance and energy footprint can be freely configured on a per
|
- A performance and energy footprint can be freely configured on a per
|
||||||
subcluster base. One can filter for footprint statistics for running and
|
subcluster base. One can filter for footprint statistics for running and
|
||||||
finished jobs.
|
finished jobs.
|
||||||
|
|
||||||
|
## Known issues
|
||||||
|
|
||||||
|
- Currently energy footprint metrics of type energy are ignored for calculating
|
||||||
|
total energy.
|
||||||
|
- Resampling for running jobs only works with cc-metric-store
|
||||||
|
- With energy footprint metrics of type power the unit is ignored and it is
|
||||||
|
assumed the metric has the unit Watt.
|
||||||
|
@ -604,9 +604,10 @@ func (r *JobRepository) UpdateEnergy(
|
|||||||
for _, fp := range sc.EnergyFootprint {
|
for _, fp := range sc.EnergyFootprint {
|
||||||
if i, err := archive.MetricIndex(sc.MetricConfig, fp); err == nil {
|
if i, err := archive.MetricIndex(sc.MetricConfig, fp); err == nil {
|
||||||
// Note: For DB data, calculate and save as kWh
|
// Note: For DB data, calculate and save as kWh
|
||||||
// Energy: Power (in Watts) * Time (in Seconds)
|
if sc.MetricConfig[i].Energy == "energy" { // this metric has energy as unit (Joules or Wh)
|
||||||
if sc.MetricConfig[i].Energy == "energy" { // this metric has energy as unit (Joules)
|
// FIXME: Needs sum as stats type
|
||||||
} else if sc.MetricConfig[i].Energy == "power" { // this metric has power as unit (Watt)
|
} else if sc.MetricConfig[i].Energy == "power" { // this metric has power as unit (Watt)
|
||||||
|
// Energy: Power (in Watts) * Time (in Seconds)
|
||||||
// Unit: ( W * s ) / 3600 / 1000 = kWh ; Rounded to 2 nearest digits
|
// Unit: ( W * s ) / 3600 / 1000 = kWh ; Rounded to 2 nearest digits
|
||||||
energy = math.Round(((LoadJobStat(jobMeta, fp, "avg")*float64(jobMeta.Duration))/3600/1000)*100) / 100
|
energy = math.Round(((LoadJobStat(jobMeta, fp, "avg")*float64(jobMeta.Duration))/3600/1000)*100) / 100
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user