aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2022-12-09 08:50:06 +0000
committerPeter Mikus <peter.mikus@protonmail.ch>2023-01-11 08:37:32 +0000
commit86138e3eb1fbaad89eb1f91937ae6bd6ba55da37 (patch)
tree16c1ae44048315cebdafd1025722df9a2f6f623f /docs
parent89c40769ccf9558024a23a4de1563355a39db5a8 (diff)
feat(model): Hoststack type
Signed-off-by: pmikus <peter.mikus@protonmail.ch> Change-Id: Ia7eefc28645c78ad346d294099ef6258faa9814f
Diffstat (limited to 'docs')
-rw-r--r--docs/model/current/schema/test_case.info.schema.json72
-rw-r--r--docs/model/current/schema/test_case.info.schema.yaml69
-rw-r--r--docs/model/current/schema/todos.txt8
-rw-r--r--docs/model/current/schema/yaml2json.py9
-rw-r--r--docs/model/current/top.rst4
5 files changed, 136 insertions, 26 deletions
diff --git a/docs/model/current/schema/test_case.info.schema.json b/docs/model/current/schema/test_case.info.schema.json
index 7bdfa27f8d..bdfea59907 100644
--- a/docs/model/current/schema/test_case.info.schema.json
+++ b/docs/model/current/schema/test_case.info.schema.json
@@ -1,5 +1,5 @@
{
- "$id": "https://fd.io/FIXME/CSIT/UTI/test_case/info/1.2.0",
+ "$id": "https://fd.io/FIXME/CSIT/UTI/test_case/info/1.3.0",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Schema for output of test case.",
"allOf": [
@@ -159,9 +159,51 @@
}
},
"required": [
+ "type",
"loss",
"aggregate_rate"
]
+ },
+ {
+ "description": "Result type HOSTSTACK case.",
+ "additionalProperties": false,
+ "properties": {
+ "type": {
+ "const": "hoststack"
+ },
+ "bandwidth": {
+ "description": "Goodput measured in bits per second.",
+ "$ref": "#/$defs/types/bandwidth"
+ },
+ "completed_requests": {
+ "description": "Number of completed requests.",
+ "$ref": "#/$defs/types/count_requests"
+ },
+ "failed_requests": {
+ "description": "Number of failed requests.",
+ "$ref": "#/$defs/types/count_requests"
+ },
+ "retransmits": {
+ "description": "Number of retransmits.",
+ "$ref": "#/$defs/types/count_packets"
+ },
+ "latency": {
+ "description": "Value and unit of latency.",
+ "$ref": "#/$defs/types/value_with_unit"
+ },
+ "duration": {
+ "description": "The relative time difference (in seconds) between program start and end.",
+ "$ref": "#/$defs/types/time_quantity"
+ },
+ "rate": {
+ "description": "RPS or CPS rate, with corresponding unit, as reported by TG.",
+ "$ref": "#/$defs/types/rate_without_bandwidth"
+ }
+ },
+ "required": [
+ "type",
+ "bandwidth"
+ ]
}
]
}
@@ -224,7 +266,7 @@
"version": {
"description": "CSIT model version (semver format) the exporting code adhered to.",
"type": "string",
- "const": "1.2.0"
+ "const": "1.3.0"
}
},
"required": [
@@ -306,11 +348,12 @@
"maxItems": 0
},
"rate_unit": {
- "description": "Packets per second (pps) or connections per second (cps).",
+ "description": "Packets per second (pps), connections per second (cps), requests per second (rps).",
"type": "string",
"enum": [
"pps",
- "cps"
+ "cps",
+ "rps"
]
},
"bandwidth_unit": {
@@ -340,6 +383,27 @@
}
]
},
+ "count_requests": {
+ "description": "Type, for counting requests.",
+ "allOf": [
+ {
+ "$ref": "#/$defs/types/value_with_unit"
+ },
+ {
+ "properties": {
+ "value": {
+ "description": "A number of requests of interest."
+ },
+ "unit": {
+ "description": "Unit suitable for displaying request counts.",
+ "enum": [
+ "requests"
+ ]
+ }
+ }
+ }
+ ]
+ },
"time_quantity": {
"description": "Reusable type, for various time quantites.",
"allOf": [
diff --git a/docs/model/current/schema/test_case.info.schema.yaml b/docs/model/current/schema/test_case.info.schema.yaml
index 022061aa39..bc5a35007f 100644
--- a/docs/model/current/schema/test_case.info.schema.yaml
+++ b/docs/model/current/schema/test_case.info.schema.yaml
@@ -1,4 +1,4 @@
-# Copyright (c) 2022 Cisco and/or its affiliates.
+# Copyright (c) 2023 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -13,7 +13,7 @@
---
-$id: https://fd.io/FIXME/CSIT/UTI/test_case/info/1.2.0
+$id: https://fd.io/FIXME/CSIT/UTI/test_case/info/1.3.0
$schema: https://json-schema.org/draft/2020-12/schema
description: >-
Schema for output of test case.
@@ -234,8 +234,48 @@ allOf:
packet rate.
$ref: "#/$defs/types/packet_with_time"
required:
+ - type
- loss
- aggregate_rate
+ - description: >-
+ Result type HOSTSTACK case.
+ additionalProperties: false
+ properties:
+ type:
+ const: hoststack
+ bandwidth:
+ description: >-
+ Goodput measured in bits per second.
+ $ref: "#/$defs/types/bandwidth"
+ completed_requests:
+ description: >-
+ Number of completed requests.
+ $ref: "#/$defs/types/count_requests"
+ failed_requests:
+ description: >-
+ Number of failed requests.
+ $ref: "#/$defs/types/count_requests"
+ retransmits:
+ description: >-
+ Number of retransmits.
+ $ref: "#/$defs/types/count_packets"
+ latency:
+ description: >-
+ Value and unit of latency.
+ $ref: "#/$defs/types/value_with_unit"
+ duration:
+ description: >-
+ The relative time difference (in seconds)
+ between program start and end.
+ $ref: "#/$defs/types/time_quantity"
+ rate:
+ description: >-
+ RPS or CPS rate, with corresponding unit, as
+ reported by TG.
+ $ref: "#/$defs/types/rate_without_bandwidth"
+ required:
+ - type
+ - bandwidth
start_time:
description: >-
UTC date and time in RFC 3339 format, specifying calendar time
@@ -325,7 +365,7 @@ allOf:
CSIT model version (semver format)
the exporting code adhered to.
type: string
- const: 1.2.0
+ const: 1.3.0
required:
- duration
- dut_type
@@ -388,11 +428,14 @@ $defs:
maxItems: 0
rate_unit:
description: >-
- Packets per second (pps) or connections per second (cps).
+ Packets per second (pps),
+ connections per second (cps),
+ requests per second (rps).
type: string
enum:
- pps
- cps
+ - rps
bandwidth_unit:
description: >-
Unit of measurement for bandwidth values.
@@ -414,6 +457,20 @@ $defs:
Unit suitable for displaying packet counts.
enum:
- packets
+ count_requests:
+ description: >-
+ Type, for counting requests.
+ allOf:
+ - $ref: "#/$defs/types/value_with_unit"
+ - properties:
+ value:
+ description: >-
+ A number of requests of interest.
+ unit:
+ description: >-
+ Unit suitable for displaying request counts.
+ enum:
+ - requests
time_quantity:
description: >-
Reusable type, for various time quantites.
@@ -477,8 +534,8 @@ $defs:
- properties:
value:
description: >-
- Bandwidth value computed
- from the corresponding rate.
+ Bandwidth value computed from the corresponding
+ rate.
unit:
$ref: "#/$defs/types/bandwidth_unit"
rate_with_bandwidth:
diff --git a/docs/model/current/schema/todos.txt b/docs/model/current/schema/todos.txt
deleted file mode 100644
index 91e8bb49bb..0000000000
--- a/docs/model/current/schema/todos.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-
-Add description with link to methodology for MRR, NDRPDR and SOAK.
-
-Add multiplicity field to MRR result, so PAL can detect incomplete samples.
-
-Add link explaining our L1 bandwidth calculation.
-
-Add a link to URL explaining how to decode the hdrh data.
diff --git a/docs/model/current/schema/yaml2json.py b/docs/model/current/schema/yaml2json.py
index 1b69ba9c92..6899928847 100644
--- a/docs/model/current/schema/yaml2json.py
+++ b/docs/model/current/schema/yaml2json.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2023 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -11,10 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-"""Utility to convert from .schema.yaml to .schema.json.
-
-TODO: Read the input file name from command line argument.
-"""
+"""Utility to convert from .schema.yaml to .schema.json."""
import glob
import json
@@ -24,4 +21,4 @@ import yaml
for filename in glob.glob(u"*.schema.yaml"):
name = filename[:-5]
with open(f"{name}.yaml", u"r") as fin, open(f"{name}.json", u"w") as fout:
- json.dump(yaml.load(fin.read()), fout, indent=2)
+ json.dump(yaml.safe_load(fin.read()), fout, indent=2)
diff --git a/docs/model/current/top.rst b/docs/model/current/top.rst
index 3f7f976adf..3f09710ceb 100644
--- a/docs/model/current/top.rst
+++ b/docs/model/current/top.rst
@@ -1,5 +1,5 @@
..
- Copyright (c) 2022 Cisco and/or its affiliates.
+ Copyright (c) 2023 Cisco and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at:
@@ -22,7 +22,7 @@ especially the export side (UTI), not import side (PAL).
Version
~~~~~~~
-This document is valid for CSIT model version 1.2.0.
+This document is valid for CSIT model version 1.3.0.
It is recommended to use semantic versioning: https://semver.org/
That means, if the new model misses a field present in the old model,