Fix broken schema and add tests

This commit is contained in:
Jan Eitzinger
2022-09-20 10:27:23 +02:00
parent 207254a9e2
commit 2fdf1c14be
9 changed files with 200 additions and 126 deletions

View File

@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft/2020-12/schema",
"$id": "embedFS://schemas/cluster.schema.json",
"$id": "embedfs://cluster.schema.json",
"title": "HPC cluster description",
"description": "Meta data information of a HPC cluster",
"type": "object",
@@ -78,7 +78,8 @@
"scope",
"timestep"
]
}
},
"minItems": 1
},
"subClusters": {
"description": "Array of cluster hardware partitions",
@@ -223,7 +224,8 @@
"flopRateSimd",
"memoryBandwidth"
]
}
},
"minItems": 1
}
},
"required":[

View File

@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft/2020-12/schema",
"$id": "embedFS://schemas/config.schema.json",
"$id": "embedfs://config.schema.json",
"title": "cc-backend configuration file schema",
"type": "object",
"properties":{

View File

@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft/2020-12/schema",
"$id": "embedFS://schemas/job-data.schema.json",
"$id": "embedfs://job-data.schema.json",
"title": "Job metric data list",
"description": "Collection of metric data of a HPC job",
"type": "object",
@@ -10,7 +10,7 @@
"type": "object",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -21,19 +21,19 @@
"description": "Total flop rate with DP flops scaled up",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"socket": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"memoryDomain": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"core": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"hwthread": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"minProperties": 1
@@ -42,13 +42,13 @@
"description": "Main memory bandwidth",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"socket": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"memoryDomain": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"minProperties": 1
@@ -58,7 +58,7 @@
"type": "object",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -69,19 +69,19 @@
"description": "Instructions executed per cycle",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"socket": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"memoryDomain": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"core": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"hwthread": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"minProperties": 1
@@ -90,19 +90,19 @@
"description": "CPU active core utilization",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"socket": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"memoryDomain": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"core": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"hwthread": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"minProperties": 1
@@ -111,7 +111,7 @@
"description": "CPU requested core utilization (load 1m)",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -122,19 +122,19 @@
"description": "Double precision flop rate",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"socket": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"memoryDomain": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"core": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"hwthread": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"minProperties": 1
@@ -143,19 +143,19 @@
"description": "Single precision flops rate",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"socket": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"memoryDomain": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"core": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"hwthread": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"minProperties": 1
@@ -164,19 +164,19 @@
"description": "Fraction of arithmetic instructions using SIMD instructions",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"socket": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"memoryDomain": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"core": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"hwthread": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"minProperties": 1
@@ -185,10 +185,10 @@
"description": "CPU power consumption",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"socket": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"minProperties": 1
@@ -197,10 +197,10 @@
"description": "Memory power consumption",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"socket": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"minProperties": 1
@@ -209,7 +209,7 @@
"description": "GPU utilization",
"properties": {
"accelerator": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -220,7 +220,7 @@
"description": "GPU memory capacity used",
"properties": {
"accelerator": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -231,7 +231,7 @@
"description": "GPU power consumption",
"properties": {
"accelerator": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -242,19 +242,19 @@
"description": "Average core frequency",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"socket": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"memoryDomain": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"core": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
},
"hwthread": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"minProperties": 1
@@ -263,7 +263,7 @@
"description": "Ethernet read bandwidth",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -274,7 +274,7 @@
"description": "Ethernet write bandwidth",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -306,7 +306,7 @@
"description": "File system read bandwidth",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -317,7 +317,7 @@
"description": "File system write bandwidth",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -328,7 +328,7 @@
"description": "File system read requests",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -339,7 +339,7 @@
"description": "File system write requests",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -350,7 +350,7 @@
"description": "File system write requests",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -361,7 +361,7 @@
"description": "File system open and close",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -372,7 +372,7 @@
"description": "File system fsync",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -383,7 +383,7 @@
"description": "File system create",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -394,7 +394,7 @@
"description": "File system open",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -405,7 +405,7 @@
"description": "File system close",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -416,7 +416,7 @@
"description": "File system seek",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -438,7 +438,7 @@
"description": "Network interconnect read packets",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -449,7 +449,7 @@
"description": "Network interconnect send packet",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -460,7 +460,7 @@
"description": "Network interconnect read bandwidth",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [
@@ -471,7 +471,7 @@
"description": "Network interconnect write bandwidth",
"properties": {
"node": {
"$ref": "embedFS://schemas/job-metric-data.schema.json"
"$ref": "embedfs://job-metric-data.schema.json"
}
},
"required": [

View File

@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft/2020-12/schema",
"$id": "embedFS://schemas/job-meta.schema.json",
"$id": "embedfs://job-meta.schema.json",
"title": "Job meta data",
"description": "Meta data information of a HPC job",
"type": "object",
@@ -172,87 +172,87 @@
"properties": {
"mem_used": {
"description": "Memory capacity used (required)",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"cpu_load": {
"description": "CPU requested core utilization (load 1m) (required)",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"flops_any": {
"description": "Total flop rate with DP flops scaled up (required)",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"mem_bw": {
"description": "Main memory bandwidth (required)",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"net_bw": {
"description": "Total fast interconnect network bandwidth (required)",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"file_bw": {
"description": "Total file IO bandwidth (required)",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"ipc": {
"description": "Instructions executed per cycle",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"cpu_used": {
"description": "CPU active core utilization",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"flops_dp": {
"description": "Double precision flop rate",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"flops_sp": {
"description": "Single precision flops rate",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"rapl_power": {
"description": "CPU power consumption",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"gpu_used": {
"description": "GPU utilization",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"gpu_mem_used": {
"description": "GPU memory capacity used",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"gpu_power": {
"description": "GPU power consumption",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"clock": {
"description": "Average core frequency",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"eth_read_bw": {
"description": "Ethernet read bandwidth",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"eth_write_bw": {
"description": "Ethernet write bandwidth",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"ic_rcv_packets": {
"description": "Network interconnect read packets",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"ic_send_packets": {
"description": "Network interconnect send packet",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"ic_read_bw": {
"description": "Network interconnect read bandwidth",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"ic_write_bw": {
"description": "Network interconnect write bandwidth",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"filesystems": {
"description": "Array of filesystems",
@@ -277,47 +277,47 @@
},
"read_bw": {
"description": "File system read bandwidth",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"write_bw": {
"description": "File system write bandwidth",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"read_req": {
"description": "File system read requests",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"write_req": {
"description": "File system write requests",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"inodes": {
"description": "File system write requests",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"accesses": {
"description": "File system open and close",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"fsync": {
"description": "File system fsync",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"create": {
"description": "File system create",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"open": {
"description": "File system open",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"close": {
"description": "File system close",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
},
"seek": {
"description": "File system seek",
"$ref": "embedFS://schemas/job-metric-statistics.schema.json"
"$ref": "embedfs://job-metric-statistics.schema.json"
}
},
"required": [

View File

@@ -1,13 +1,13 @@
{
"$schema": "http://json-schema.org/draft/2020-12/schema",
"$id": "embedFS://schemas/job-metric-data.schema.json",
"$id": "embedfs://job-metric-data.schema.json",
"title": "Job metric data",
"description": "Metric data of a HPC job",
"type": "object",
"properties": {
"unit": {
"description": "Metric unit",
"$ref": "embedFS://schemas/unit.schema.json"
"$ref": "embedfs://unit.schema.json"
},
"timestep": {
"description": "Measurement interval in seconds",

View File

@@ -1,13 +1,13 @@
{
"$schema": "http://json-schema.org/draft/2020-12/schema",
"$id": "schemaFS://schemas/job-metric-statistics.schema.json",
"$id": "schemafs://job-metric-statistics.schema.json",
"title": "Job statistics",
"description": "Format specification for job metric statistics",
"type": "object",
"properties": {
"unit": {
"description": "Metric unit",
"$ref": "embedFS://schemas/unit.schema.json"
"$ref": "embedfs://unit.schema.json"
},
"avg": {
"description": "Job metric average",

View File

@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft/2020-12/schema",
"$id": "embedFS://schemas/unit.schema.json",
"$id": "embedfs://unit.schema.json",
"title": "Metric unit",
"description": "Format specification for job metric units",
"type": "object",