Skip to content

BenchX comparison document

urn:benchx:schema:comparison-document:0.1.0 · version 0.1.0 · schema.json · source

The comparator's output: verdicts for target results against their references, with the selector that formed the evidence and the method that assessed it. See docs/design/comparator.md section 5. Derived and recomputed on demand; the store keeps its inputs, not the document.

Implementer note

Rules the schema cannot express and the comparator enforces: inputs lists every result the document refers to; local_only is true when any input is not clean in subject_dirty or benchmark_dirty (benchmark-result-schema.md section 5.5); a unit affected by a failed invariant has no verdict and appears in no units entry; every result of a unit is in exactly one of its used and excluded; details conforms to the schema of the method that wrote it, which the framework checks when it produces the document; under the preceding-window selector every reference result precedes the target under the recorded ordering.

Properties

Property Required Type Description
schema_version yes constant "benchx/comparison-document/0.1.0" Message contract version this object conforms to.
selector yes selector
method yes method The method requested and its complete configuration, recorded even when a failed invariant left no units.
estimator yes estimator Estimator every compared value was computed with.
identity_schema yes token Versioned name of the projection under which series membership and comparability were decided: for a profile, its own name and its identity policy's (benchmark-result-schema.md section 4.3).
local_only yes boolean True when any input is not clean; such a comparison never promotes into tracked history.
sides object The sides the selector named, when it names them. Absent from a selector whose sides are its own, such as reference and target. See sides.
failed_invariants yes array of failedInvariant Invariants the evidence did not satisfy, whether the selector's or the method's (comparator.md section 3).
units yes array of unit One evaluation each: one series and its assessment.
missing yes array of missing Expected targets with no result, such as a side absent from a run or a series with no result from a batch request's target.
exclusions yes array of exclusion Results left out of the evidence of any evaluated unit because they have no usable estimate, with the reason. Each also appears in its unit's excluded.
inputs yes array of resultRef (unique items) Every result the comparison consumed.

No other properties are allowed.

sides

The sides the selector named, when it names them. Absent from a selector whose sides are its own, such as reference and target.

Property Required Type Description
varying yes token Path of the coordinate whose value distinguishes the sides, such as provenance.subject_tree or coordinates.workload.parameters.role.
baseline yes side The reference side, as its value of the varying coordinate.
contender side The target side. Absent when a failed invariant prevented identifying it.
declared object What each side declared about how it was built and entered, recorded as given and never judged, beside the environment the runner observed for it. See sides.declared.

No other properties are allowed.

sides.declared

What each side declared about how it was built and entered, recorded as given and never judged, beside the environment the runner observed for it.

Property Required Type Description
baseline declared
contender declared

No other properties are allowed.

Definitions

Reusable subschemas referenced from the tables above and from other schemas.

method

Comparison method: a stable name and version and its complete configuration, such as k and minimum evidence.

Property Required Type Description
name yes token
version yes token
configuration yes object

No other properties are allowed.

boundary

Property Required Type Description
kind yes one of "distribution-reset", "change-point", "continuity"
at resultRef First result after the boundary.
detail nonEmptyString

No other properties are allowed.

side

A value of the varying coordinate, such as a tree id, a label, or a parameter value.

Type: not null

  • Must not be null.

declared

One side's declared text, copied from its results' provenance.info, and the allowlisted environment variables observed for it.

Property Required Type Description
how_built nonEmptyString
activation nonEmptyString
shell token
target_provider object See declared.target_provider.
observed_env map of string

No other properties are allowed.

declared.target_provider

Property Required Type Description
name yes nonEmptyString
version nonEmptyString

No other properties are allowed.

failedInvariant

Property Required Type Description
invariant yes token Name of the invariant, such as alternating-slots or equal-attempts.
detail yes nonEmptyString
workload workload The unit it affects, when it affects only one.
quantity token

No other properties are allowed.

missing

Property Required Type Description
workload yes workload
quantity yes token
side token The side with no result, as the selector names it, such as baseline or target.
series sha256 The expected series, when the request named it.

No other properties are allowed.

exclusion

Property Required Type Description
result yes resultRef
reason yes nonEmptyString

No other properties are allowed.

workload

Workload variant: a named operation plus one parameter assignment.

Property Required Type Description
name yes nonEmptyString
parameters map of parameterValue

No other properties are allowed.

estimator

Estimator declaration, as in the measurement-result schema.

Property Required Type Description
name yes token
method_version yes token
input_level yes one of "observations", "estimates"
parameters object
inputs array of object (min items 1)

No other properties are allowed.

resultRef

Stable reference to a stored result.

Property Required Type Description
producer yes token
ingest_key yes token

No other properties are allowed.

parameterValue

Type: exactly one of: primitive; array of primitive

primitive

Type: string or number or boolean or null

sha256

Type: string (pattern ^[0-9a-f]{64}$)

token

Non-empty string without whitespace.

Type: string (pattern ^\S+$; min length 1)

nonEmptyString

Type: string (min length 1)

selector

How the evidence was formed: a versioned selector and the parameters it was given, with anything the caller abbreviated resolved, so one comparison has one document however it was asked for.

Property Required Type Description
name yes token
version yes token
params yes object

No other properties are allowed.

methodRef

The method that wrote an outcome. Its configuration is in the document's method.

Property Required Type Description
name yes token
version yes token

No other properties are allowed.

evidence

What a history verdict rests on: the target, the reference it was compared with, how the reference was ordered, and what truncated or joined it.

Property Required Type Description
target array of resultRef (min items 1) The results being evaluated, when the selector distinguishes them from a reference.
reference array of resultRef The reference points the reference estimate was formed from, oldest first.
ordering one of "ancestry", "native-order", "native-time" How the reference points were ordered before the target. Absent when no order was available.
boundaries array of boundary Resets, change points, and continuity joins that truncated or joined the reference.

No other properties are allowed.

unit

One series and the method's assessment of it.

Property Required Type Description
workload yes workload
quantity yes token
series sha256 The unit's series under the projection the selector grouped by: the one its results that count share (the successful ones, else every attempt). Absent when they share none, as when the benchmark was edited between them (reason benchmark-changed): no single series is compared.
attempts map of attempts How each side's attempts at this unit ended, by status, the sides as the selector names them: the evidence behind a reason such as not-measured, a side with no success.
evidence evidence
method yes methodRef
verdict yes one of "improved", "regressed", "changed", "no-change-detected", "equivalent", "indeterminate"
reason token Why the verdict is indeterminate, such as insufficient-rounds, not-measured (a side with no successful attempt), side-failed, or benchmark-changed (the benchmark was edited between the results, so they are not comparable).
effect object The headline change, when the method reports one. See unit.effect.
used yes array of resultRef The results the verdict rests on.
excluded yes array of exclusion The unit's other results, each with the reason.
details yes object Whatever else the method reports, such as what it computed as noise; validated by the method's own schema.
unmatched_differences array of token (unique items) Coordinates the projection does not match, by JSON Pointer, whose values differ between target and reference.
caveats array of nonEmptyString Quality caveats the reader should see.

No other properties are allowed.

Rules:

  • If verdict is "indeterminate", then requires reason.

unit.effect

The headline change, when the method reports one.

Property Required Type Description
measure yes token The method's effect measure, such as relative, difference, or log-ratio.
value yes number

No other properties are allowed.

attempts

Attempt counts by status, for one side of a unit.

Type: map of integer (>= 1) (keys token)

Examples

{
  "schema_version": "benchx/comparison-document/0.1.0",
  "selector": {
    "name": "benchx/preceding-window",
    "version": "v1",
    "params": {
      "target": {
        "producer": "example.org/arrow-adapter",
        "ingest_key": "ci-1240:parquet-read/snappy:wall-time"
      },
      "window": 20
    }
  },
  "method": {
    "name": "benchx/dispersion-scaled",
    "version": "v1",
    "configuration": {
      "k": 3.0,
      "window": 20,
      "min_points": 4
    }
  },
  "estimator": {
    "name": "min",
    "method_version": "benchx/min/v1",
    "input_level": "observations"
  },
  "identity_schema": "arrow/identity/v2",
  "local_only": false,
  "failed_invariants": [],
  "units": [
    {
      "workload": {
        "name": "parquet-read",
        "parameters": {
          "compression": "snappy"
        }
      },
      "quantity": "wall-time",
      "series": "5b7d9f1a3c5e7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7d",
      "evidence": {
        "target": [
          {
            "producer": "example.org/arrow-adapter",
            "ingest_key": "ci-1240:parquet-read/snappy:wall-time"
          }
        ],
        "reference": [
          {
            "producer": "example.org/arrow-adapter",
            "ingest_key": "ci-1236:parquet-read/snappy:wall-time"
          },
          {
            "producer": "example.org/arrow-adapter",
            "ingest_key": "ci-1237:parquet-read/snappy:wall-time"
          },
          {
            "producer": "example.org/arrow-adapter",
            "ingest_key": "ci-1238:parquet-read/snappy:wall-time"
          },
          {
            "producer": "example.org/arrow-adapter",
            "ingest_key": "ci-1239:parquet-read/snappy:wall-time"
          }
        ],
        "ordering": "ancestry",
        "boundaries": [
          {
            "kind": "distribution-reset",
            "at": {
              "producer": "example.org/arrow-adapter",
              "ingest_key": "ci-1236:parquet-read/snappy:wall-time"
            },
            "detail": "runner kernel upgraded"
          }
        ]
      },
      "method": {
        "name": "benchx/dispersion-scaled",
        "version": "v1"
      },
      "verdict": "no-change-detected",
      "effect": {
        "measure": "relative",
        "value": -0.008
      },
      "used": [
        {
          "producer": "example.org/arrow-adapter",
          "ingest_key": "ci-1236:parquet-read/snappy:wall-time"
        },
        {
          "producer": "example.org/arrow-adapter",
          "ingest_key": "ci-1237:parquet-read/snappy:wall-time"
        },
        {
          "producer": "example.org/arrow-adapter",
          "ingest_key": "ci-1238:parquet-read/snappy:wall-time"
        },
        {
          "producer": "example.org/arrow-adapter",
          "ingest_key": "ci-1239:parquet-read/snappy:wall-time"
        },
        {
          "producer": "example.org/arrow-adapter",
          "ingest_key": "ci-1240:parquet-read/snappy:wall-time"
        }
      ],
      "excluded": [
        {
          "result": {
            "producer": "example.org/arrow-adapter",
            "ingest_key": "ci-1235:parquet-read/snappy:wall-time"
          },
          "reason": "status error"
        }
      ],
      "details": {
        "reference_estimate": 0.0102,
        "noise": 0.004,
        "noise_kind": "standard-deviation",
        "noise_source": "reference-points",
        "threshold": 0.012
      },
      "unmatched_differences": [
        "/coordinates/environment/system/os/kernel"
      ]
    }
  ],
  "missing": [],
  "exclusions": [
    {
      "result": {
        "producer": "example.org/arrow-adapter",
        "ingest_key": "ci-1235:parquet-read/snappy:wall-time"
      },
      "reason": "status error"
    }
  ],
  "inputs": [
    {
      "producer": "example.org/arrow-adapter",
      "ingest_key": "ci-1235:parquet-read/snappy:wall-time"
    },
    {
      "producer": "example.org/arrow-adapter",
      "ingest_key": "ci-1236:parquet-read/snappy:wall-time"
    },
    {
      "producer": "example.org/arrow-adapter",
      "ingest_key": "ci-1237:parquet-read/snappy:wall-time"
    },
    {
      "producer": "example.org/arrow-adapter",
      "ingest_key": "ci-1238:parquet-read/snappy:wall-time"
    },
    {
      "producer": "example.org/arrow-adapter",
      "ingest_key": "ci-1239:parquet-read/snappy:wall-time"
    },
    {
      "producer": "example.org/arrow-adapter",
      "ingest_key": "ci-1240:parquet-read/snappy:wall-time"
    }
  ]
}
{
  "schema_version": "benchx/comparison-document/0.1.0",
  "selector": {
    "name": "benchx/run-profile",
    "version": "v1",
    "params": {
      "run_key": "urn:uuid:9b2e4f1a-6c3d-4e8b-a1f0-2d7c5b9e3a41",
      "profile": "environments",
      "baseline": "plain",
      "label": "build"
    }
  },
  "method": {
    "name": "benchx/paired-relative",
    "version": "v1",
    "configuration": {
      "k": 3.0,
      "min_rounds": 3
    }
  },
  "estimator": {
    "name": "median",
    "method_version": "benchx/median/v1",
    "input_level": "observations"
  },
  "identity_schema": "benchx/profile/environments/v1+benchx/benchx-identity/v1",
  "local_only": true,
  "sides": {
    "varying": "provenance.labels.build",
    "baseline": "plain",
    "contender": "hardened"
  },
  "failed_invariants": [],
  "units": [
    {
      "workload": {
        "name": "TakeChunked/4194304/2"
      },
      "quantity": "wall-time",
      "series": "c4a8e21f6b0d3975e1f8a2c6d4b07e3915fa8c2d6e0b4a7193d5c8f2e6a1b047",
      "method": {
        "name": "benchx/paired-relative",
        "version": "v1"
      },
      "verdict": "regressed",
      "effect": {
        "measure": "relative",
        "value": 0.024
      },
      "used": [
        {
          "producer": "benchx/gbench-adapter",
          "ingest_key": "run-9b2e:TakeChunked/4194304/2:slot-1:wall-time"
        },
        {
          "producer": "benchx/gbench-adapter",
          "ingest_key": "run-9b2e:TakeChunked/4194304/2:slot-2:wall-time"
        },
        {
          "producer": "benchx/gbench-adapter",
          "ingest_key": "run-9b2e:TakeChunked/4194304/2:slot-3:wall-time"
        },
        {
          "producer": "benchx/gbench-adapter",
          "ingest_key": "run-9b2e:TakeChunked/4194304/2:slot-4:wall-time"
        },
        {
          "producer": "benchx/gbench-adapter",
          "ingest_key": "run-9b2e:TakeChunked/4194304/2:slot-5:wall-time"
        },
        {
          "producer": "benchx/gbench-adapter",
          "ingest_key": "run-9b2e:TakeChunked/4194304/2:slot-6:wall-time"
        }
      ],
      "excluded": [],
      "details": {
        "rounds": 3,
        "reference_estimate": 0.0455,
        "noise": 0.0021,
        "noise_kind": "standard-error",
        "noise_source": "paired-rounds",
        "degrees_of_freedom": 2,
        "threshold": 0.0063
      },
      "unmatched_differences": [],
      "attempts": {
        "baseline": {
          "success": 3
        },
        "contender": {
          "success": 3
        }
      }
    },
    {
      "workload": {
        "name": "TakeChunked/65536/2"
      },
      "quantity": "wall-time",
      "series": "7d13f0b9c2e64a8815d7ca30e9f2b6417ac8d05e3b1f96c2704ea8d1c3b5f692",
      "method": {
        "name": "benchx/paired-relative",
        "version": "v1"
      },
      "verdict": "indeterminate",
      "reason": "insufficient-rounds",
      "used": [
        {
          "producer": "benchx/gbench-adapter",
          "ingest_key": "run-9b2e:TakeChunked/65536/2:slot-7:wall-time"
        },
        {
          "producer": "benchx/gbench-adapter",
          "ingest_key": "run-9b2e:TakeChunked/65536/2:slot-8:wall-time"
        },
        {
          "producer": "benchx/gbench-adapter",
          "ingest_key": "run-9b2e:TakeChunked/65536/2:slot-9:wall-time"
        },
        {
          "producer": "benchx/gbench-adapter",
          "ingest_key": "run-9b2e:TakeChunked/65536/2:slot-10:wall-time"
        }
      ],
      "excluded": [],
      "details": {
        "rounds": 2,
        "reference_estimate": 0.00071,
        "noise_kind": "standard-error",
        "noise_source": "paired-rounds"
      },
      "unmatched_differences": [],
      "attempts": {
        "baseline": {
          "success": 2
        },
        "contender": {
          "success": 2
        }
      }
    }
  ],
  "missing": [
    {
      "workload": {
        "name": "TakeChunked/1024/2"
      },
      "quantity": "wall-time",
      "side": "contender"
    }
  ],
  "exclusions": [],
  "inputs": [
    {
      "producer": "benchx/gbench-adapter",
      "ingest_key": "run-9b2e:TakeChunked/4194304/2:slot-1:wall-time"
    },
    {
      "producer": "benchx/gbench-adapter",
      "ingest_key": "run-9b2e:TakeChunked/4194304/2:slot-2:wall-time"
    },
    {
      "producer": "benchx/gbench-adapter",
      "ingest_key": "run-9b2e:TakeChunked/4194304/2:slot-3:wall-time"
    },
    {
      "producer": "benchx/gbench-adapter",
      "ingest_key": "run-9b2e:TakeChunked/4194304/2:slot-4:wall-time"
    },
    {
      "producer": "benchx/gbench-adapter",
      "ingest_key": "run-9b2e:TakeChunked/4194304/2:slot-5:wall-time"
    },
    {
      "producer": "benchx/gbench-adapter",
      "ingest_key": "run-9b2e:TakeChunked/4194304/2:slot-6:wall-time"
    },
    {
      "producer": "benchx/gbench-adapter",
      "ingest_key": "run-9b2e:TakeChunked/65536/2:slot-7:wall-time"
    },
    {
      "producer": "benchx/gbench-adapter",
      "ingest_key": "run-9b2e:TakeChunked/65536/2:slot-8:wall-time"
    },
    {
      "producer": "benchx/gbench-adapter",
      "ingest_key": "run-9b2e:TakeChunked/65536/2:slot-9:wall-time"
    },
    {
      "producer": "benchx/gbench-adapter",
      "ingest_key": "run-9b2e:TakeChunked/65536/2:slot-10:wall-time"
    },
    {
      "producer": "benchx/gbench-adapter",
      "ingest_key": "run-9b2e:TakeChunked/1024/2:slot-11:wall-time"
    },
    {
      "producer": "benchx/gbench-adapter",
      "ingest_key": "run-9b2e:TakeChunked/1024/2:slot-12:wall-time"
    }
  ]
}