Merge branch 'dev' into sample_resolution_select

- Moved resample changes to metricDataDispatcher
- Added res argument to archiver, updateFootprintService
This commit is contained in:
Christoph Kluge
2024-09-05 17:26:43 +02:00
25 changed files with 824 additions and 524 deletions

View File

@@ -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)
}

View File

@@ -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,

View File

@@ -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",

View File

@@ -54,7 +54,7 @@ type SubClusterConfig struct {
Alert float64 `json:"alert"`
Remove bool `json:"remove"`
LowerIsBetter bool `json:"lowerIsBetter"`
Energy bool `json:"energy"`
Energy string `json:"energy"`
}
type MetricConfig struct {
@@ -70,7 +70,7 @@ type MetricConfig struct {
Alert float64 `json:"alert"`
Timestep int `json:"timestep"`
LowerIsBetter bool `json:"lowerIsBetter"`
Energy bool `json:"energy"`
Energy string `json:"energy"`
}
type Cluster struct {

View File

@@ -50,7 +50,11 @@
},
"energy": {
"description": "Is it used to calculate job energy",
"type": "boolean"
"type": "string",
"enum": [
"power",
"energy"
]
},
"lowerIsBetter": {
"description": "Is lower better.",
@@ -93,7 +97,11 @@
},
"energy": {
"description": "Is it used to calculate job energy. Overwrite global",
"type": "boolean"
"type": "string",
"enum": [
"power",
"energy"
]
},
"lowerIsBetter": {
"description": "Is lower better. Overwrite global",