measurement

A measurement object is used to store a measure registered by a test.

{
    "$schema": "http://api.kernelci.org/json-schema/1.0/measurement.json",
    "id": "http://api.kernelci.org/json-schema/1.0/measurement.json",
    "title": "measurement",
    "description": "A measurement registered by a test case",
    "type": "object",
    "properties": {
        "name": {
            "type": "string",
            "description": "The name given to this measurement"
        },
        "time": {
            "type": "number",
            "description": "Epoch time when the measurement was registered",
            "format": "utc-millisec"
        },
        "unit": {
            "type": "string",
            "description": "The unit of this measurement",
            "enum": ["string", "epoch", "time", "watt", "volt", "number", "integer"],
            "default": "string"
        },
        "measure": {
            "type": ["string", "number", "integer"],
            "description": "The data measured during the test case execution; the value will be interpreted based on the $unit field"
        }
    },
    "required": ["measure"]
}

Notes

For the measure field, the following conversions are applied based on the specified unit:

  • number: Will be treated as a floating point number.
  • integer: Will be treated as an integer number; if a floating point number was provided, details/precision of the value will be lost.
  • time: Will be treated as an integer describing the total number of seconds.
  • epoch: Will be treated as an integer describing the milliseconds from epoch time (1970-01-01).
  • watt, volt: Will be treated as floating point numbers.
  • string: Will be treated as a normal string.