From 8e2475ca391efbbd9171874f986eac80aa2c852b Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Tue, 15 Oct 2019 20:43:09 +0200 Subject: [PATCH] Add unit json schema. Add exclusive boolean. --- json-schema/job-meta.schema.json | 4 +++ json-schema/job-statistic.schema.json | 2 +- json-schema/unit.schema.json | 36 +++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 json-schema/unit.schema.json diff --git a/json-schema/job-meta.schema.json b/json-schema/job-meta.schema.json index 95e2291..2434f43 100644 --- a/json-schema/job-meta.schema.json +++ b/json-schema/job-meta.schema.json @@ -25,6 +25,10 @@ "type": "integer", "exclusiveMinimum": 0 }, + "exclusive": { + "description": "Job uses only exclusive nodes", + "type": "boolean" + }, "walltime": { "description": "Requested walltime of job in seconds", "type": "integer", diff --git a/json-schema/job-statistic.schema.json b/json-schema/job-statistic.schema.json index a5e0627..04d5e93 100644 --- a/json-schema/job-statistic.schema.json +++ b/json-schema/job-statistic.schema.json @@ -6,7 +6,7 @@ "properties": { "unit": { "description": "Metric unit", - "type": "string" + "#ref": "https://github.com/RRZE-HPC/HPCJobDatabase/blob/master/json-schema/unit.schema.json" }, "avg": { "description": "Job metric average", diff --git a/json-schema/unit.schema.json b/json-schema/unit.schema.json new file mode 100644 index 0000000..1917361 --- /dev/null +++ b/json-schema/unit.schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Metric unit", + "description": "Format specification for job metric units", + "type": "object", + "properties": { + "base_unit": { + "description": "Metric base unit", + "type": "string", + "enum": [ + "B", + "F", + "B/s", + "F/s", + "CPI", + "IPC", + "Hz", + ] + }, + "prefix": { + "description": "Unit prefix", + "type": "string", + "enum": [ + "K", + "M", + "G", + "T", + "P", + "E" + ] + } + }, + "required": [ + "base_unit" + ] +}