increase server timeout limit, improve and add db indices

- change energy footprint key to string
This commit is contained in:
Christoph Kluge
2024-08-27 17:43:48 +02:00
parent 084f89fa32
commit cff60eb51c
5 changed files with 22 additions and 10 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)
}
}

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