{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/roark/json-schema/roark-benchmark-metric-schema.json",
  "title": "BenchmarkMetric",
  "description": "A metric a suite version published, and the direction that counts as better",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/roark-benchmark-api-openapi.yml#/components/schemas/BenchmarkMetric",
  "type": "object",
  "properties": {
    "metricKey": {
      "type": "string"
    },
    "metricName": {
      "type": "string"
    },
    "metricKind": {
      "type": "string",
      "enum": [
        "NUMERIC",
        "BOOLEAN"
      ],
      "description": "Which statistics are populated on a result. NUMERIC fills p50/p95/mean/ci; BOOLEAN fills passRate and its interval."
    },
    "unitSymbol": {
      "type": [
        "string",
        "null"
      ]
    },
    "goal": {
      "type": "string",
      "enum": [
        "higher",
        "lower",
        "neutral"
      ],
      "description": "Which end of the scale is better. `higher` and `lower` can be ranked; `neutral` is an observational metric that describes a conversation rather than grading it, so sorting on it names no winner."
    }
  },
  "required": [
    "metricKey",
    "metricName",
    "metricKind",
    "unitSymbol",
    "goal"
  ]
}