{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://cocotec.io/schemas/popili/process-stats-v1.schema.json",
  "title": "Process Statistics",
  "$ref": "#/$defs/ProcessStats",
  "$defs": {
    "ProcessStats": {
      "type": "object",
      "properties": {
        "$schema": {
          "type": "string",
          "description": "The schema that this document conforms to."
        },
        "faults": {
          "type": "integer",
          "description": "The number of page faults"
        },
        "peak_commit": {
          "type": "integer",
          "description": "The peak amount of virtual memory used, in bytes (when available)"
        },
        "peak_rss": {
          "type": "integer",
          "description": "The peak amount of memory actually used, in bytes"
        },
        "real": {
          "type": "integer",
          "description": "The total duration of the invocation, measured in wall-clock time, in milliseconds"
        },
        "system": {
          "type": "integer",
          "description": "The total amount of time spent in the kernel across all CPU cores, in milliseconds"
        },
        "user": {
          "type": "integer",
          "description": "The total amount of time spent in user space across all CPU cores, in milliseconds"
        }
      },
      "required": ["user", "system", "faults", "peak_rss"],
      "unevaluatedProperties": false,
      "description": "Statistics about an execution of a process",
      "title": "ProcessStats"
    }
  }
}
