mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-22 20:41:40 +02:00
Merge branch 'dev' into 275_add_tag_scope
This commit is contained in:
@@ -88,7 +88,7 @@ func initClusterConfig() error {
|
||||
sc.Footprint = append(sc.Footprint, newMetric.Name)
|
||||
ml.Footprint = newMetric.Footprint
|
||||
}
|
||||
if newMetric.Energy {
|
||||
if newMetric.Energy != "" {
|
||||
sc.EnergyFootprint = append(sc.EnergyFootprint, newMetric.Name)
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ func initClusterConfig() error {
|
||||
if newMetric.Footprint != "" {
|
||||
sc.Footprint = append(sc.Footprint, newMetric.Name)
|
||||
}
|
||||
if newMetric.Energy {
|
||||
if newMetric.Energy != "" {
|
||||
sc.EnergyFootprint = append(sc.EnergyFootprint, newMetric.Name)
|
||||
}
|
||||
}
|
||||
@@ -221,3 +221,13 @@ func GetSubClusterByNode(cluster, hostname string) (string, error) {
|
||||
|
||||
return "", fmt.Errorf("ARCHIVE/CLUSTERCONFIG > no subcluster found for cluster %v and host %v", cluster, hostname)
|
||||
}
|
||||
|
||||
func MetricIndex(mc []schema.MetricConfig, name string) (int, error) {
|
||||
for i, m := range mc {
|
||||
if m.Name == name {
|
||||
return i, nil
|
||||
}
|
||||
}
|
||||
|
||||
return 0, fmt.Errorf("Unknown metric name %s", name)
|
||||
}
|
||||
|
@@ -94,7 +94,7 @@
|
||||
},
|
||||
"scope": "hwthread",
|
||||
"aggregation": "sum",
|
||||
"energy": true,
|
||||
"energy": "power",
|
||||
"timestep": 60,
|
||||
"peak": 500,
|
||||
"normal": 250,
|
||||
@@ -136,7 +136,7 @@
|
||||
},
|
||||
"scope": "accelerator",
|
||||
"aggregation": "sum",
|
||||
"energy": true,
|
||||
"energy": "power",
|
||||
"timestep": 60,
|
||||
"peak": 400,
|
||||
"normal": 200,
|
||||
@@ -190,7 +190,7 @@
|
||||
},
|
||||
"scope": "socket",
|
||||
"aggregation": "sum",
|
||||
"energy": true,
|
||||
"energy": "power",
|
||||
"timestep": 60,
|
||||
"peak": 500,
|
||||
"normal": 250,
|
||||
|
@@ -256,7 +256,7 @@
|
||||
"normal": 250,
|
||||
"caution": 100,
|
||||
"alert": 50,
|
||||
"energy": true
|
||||
"energy": "power"
|
||||
},
|
||||
{
|
||||
"name": "mem_power",
|
||||
@@ -270,7 +270,7 @@
|
||||
"normal": 50,
|
||||
"caution": 20,
|
||||
"alert": 10,
|
||||
"energy": true
|
||||
"energy": "power"
|
||||
},
|
||||
{
|
||||
"name": "ipc",
|
||||
|
Reference in New Issue
Block a user