feat: display energy usage in job view

- optional emission constant config line added
This commit is contained in:
Christoph Kluge
2024-09-27 13:45:44 +02:00
parent f53fc088ec
commit 48225662b1
11 changed files with 611 additions and 10 deletions

View File

@@ -75,7 +75,6 @@ func initClusterConfig() error {
if !cfg.Remove {
availability.SubClusters = append(availability.SubClusters, sc.Name)
newMetric.Peak = cfg.Peak
newMetric.Peak = cfg.Peak
newMetric.Normal = cfg.Normal
newMetric.Caution = cfg.Caution
newMetric.Alert = cfg.Alert
@@ -229,5 +228,5 @@ func MetricIndex(mc []schema.MetricConfig, name string) (int, error) {
}
}
return 0, fmt.Errorf("Unknown metric name %s", name)
return 0, fmt.Errorf("unknown metric name %s", name)
}

View File

@@ -154,4 +154,8 @@ type ProgramConfig struct {
// Array of Clusters
Clusters []*ClusterConfig `json:"clusters"`
// Energy Mix CO2 Emission Constant [g/kWh]
// If entered, displays estimated CO2 emission for job based on jobs totalEnergy
EmissionConstant int `json:"emission-constant"`
}