You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 894ed8c
Browse filesBrowse the repository at this point in the historyBrowse files
docs: update report data contract to reflect current state
Updates the data contract doc to match the production-ready state:
- TL;DR: describes the per-run-directory S3 layout (not the old
central metadata/ directory)
- Producer responsibilities: reordered to reflect the commit-signal
pattern (metrics first, metadata.json last)
- Standard testConfig keys: adds TimeBucket as a server-synthesized
key (stamped by the report-api on [Compare: Time] clones only),
adds Source column to distinguish producer-written vs server-written
- Comparison groups: expanded with step-by-step UI instructions
(select [Compare: ...] → switch Show Line Per → TimeBucket or
ClientVersion), exact bucket boundaries, when each group appears,
stable-ID and non-mutation properties
- All references to the old metadata/ layout updated
- The report-api (`protocols/base-benchmarking/report-api`) lists all
19
+
top-level prefixes, reads the `metadata.json` under each, and merges
20
+
them into a single `GET /output/metadata.json` response. The UI
21
+
consumes that one response.
22
+
- To add a benchmark run: upload metrics files first, then
23
+
`<outputDir>/metadata.json` last. The metadata file is the commit
24
+
signal — in-progress runs are invisible until it lands.
25
+
- To compare across versions or time windows: write
26
+
`testConfig.ClientVersion` per build. The report-api synthesizes
27
+
`[Compare: Versions]` and `[Compare: Time]` groups automatically and
28
+
injects them into the same dropdown the user already uses.
26
29
27
30
## S3 layout
28
31
@@ -136,15 +139,16 @@ set. The report-api **auto-generates comparison groups** from
136
139
137
140
#### Standard `testConfig` keys
138
141
139
-
| Key | Meaning | Notes |
140
-
|---|---|---|
141
-
|`BenchmarkRun`| Cohort ID | Required. |
142
-
|`TransactionPayload`| Payload type | One per execution variant. |
143
-
|`GasLimit`| Block gas limit | int. |
144
-
|`BlockTimeMilliseconds`| Target block time | int. |
145
-
|`NodeType`| EL flavor under test | e.g., `builder`, `reth`, `geth`, `base-reth-node`. |
146
-
|`ClientVersion`| EL binary version | Format: `<name>/v<semver>-<7sha>`. The report-api groups by exact-match — pin it to a stable identifier per build. |
147
-
|`ValidatorNodeType`| Validator EL flavor | Optional; defaults to `NodeType`. |
142
+
| Key | Source | Meaning | Notes |
143
+
|---|---|---|---|
144
+
|`BenchmarkRun`| Producer | Cohort ID | Required. All inner runs of one execution share this value. |
145
+
|`TransactionPayload`| Producer | Payload type | One per execution variant. |
146
+
|`GasLimit`| Producer | Block gas limit | int. |
147
+
|`BlockTimeMilliseconds`| Producer | Target block time | int. |
148
+
|`NodeType`| Producer | EL flavor under test | e.g., `builder`, `reth`, `geth`, `base-reth-node`. |
149
+
|`ClientVersion`| Producer | EL binary version | Format: `<name>/v<semver>-<7sha>`. Report-api groups by exact-match — pin to a stable identifier per build. Drives `[Compare: Versions]`. |
150
+
|`ValidatorNodeType`| Producer | Validator EL flavor | Optional; defaults to `NodeType`. |
151
+
|`TimeBucket`| Report-api (synthetic only) | Which time window a comparison run came from |`1d`, `1w`, or `1m`. Only present on `[Compare: Time]` synthetic clones. Drives "Show Line Per: TimeBucket" in the chart UI. Never write this yourself — the report-api stamps it. |
148
152
149
153
You can add any other key. The UI handles them generically — no
150
154
frontend change required.
@@ -193,51 +197,68 @@ renders, just with raw key names.
193
197
## Comparison groups (automatic)
194
198
195
199
The report-api automatically synthesizes two kinds of comparison
196
-
"runs" alongside the natural ones:
197
-
198
-
-**`[Compare: Time] <network> <testName>`** — picks the latest run
199
-
per variant per time bucket (`1d`/`1w`/`1m`).
200
-
-**`[Compare: Versions] <network> <testName>`** — picks the latest
201
-
run per variant per distinct `ClientVersion`.
202
-
203
-
These appear in the existing dropdown next to the natural
204
-
`BenchmarkRun` IDs. Selecting one loads runs spanning the comparison
205
-
dimension; the user picks `Show Line Per: ClientVersion` (or any
206
-
other testConfig key) in the existing chart UI to overlay them as
207
-
separate chart series.
200
+
"runs" alongside the natural ones. No frontend change is needed —
201
+
they appear in the existing dropdown, and the existing chart page
202
+
renders them.
203
+
204
+
-**`[Compare: Time] <testName>`** — picks the most recent run
205
+
per variant per time window: `1d` (last 24h), `1w` (1–7 days
206
+
ago), `1m` (7–30 days ago). The report-api stamps
207
+
`testConfig.TimeBucket` (`"1d"` / `"1w"` / `"1m"`) on each clone
208
+
so the chart UI can split on it.
209
+
-**`[Compare: Versions] <testName>`** — picks the most recent run
210
+
per variant per distinct `testConfig.ClientVersion`.
211
+
212
+
**How to use them in the UI:**
213
+
214
+
1. Select a `[Compare: …]` entry from the run dropdown.
215
+
2. On the chart comparison page, change `Show Line Per` to:
216
+
-**`TimeBucket`** for time comparisons (`1d` vs `1w` vs `1m`)
217
+
-**`ClientVersion`** for version comparisons
218
+
3. The chart overlays one line per bucket/version per role.
219
+
220
+
**When they appear:**
221
+
222
+
-**Time comparison**: as soon as ≥2 of the three buckets have data
223
+
for a given `(testName, network)`. Any benchmark with a few weeks
224
+
of history qualifies immediately.
225
+
-**Version comparison**: as soon as ≥2 distinct
226
+
`testConfig.ClientVersion` values exist for a given cohort.
227
+
Empty/missing versions are silently skipped. Requires the
228
+
`base/benchmark` runner change that populates `ClientVersion`.
208
229
209
-
For these to populate:
230
+
A cohort with fewer than 2 distinct buckets is dropped from the
231
+
dropdown — a comparison of one thing isn't a comparison.
210
232
211
-
-**Time comparison** needs runs spanning ≥2 time buckets. Any
212
-
reasonable history satisfies this.
213
-
-**Version comparison** needs runs with ≥2 distinct
214
-
`testConfig.ClientVersion` values. Empty/missing versions are
215
-
silently skipped.
233
+
**Synthetic IDs are stable**: `compare-time-mainnet-base-mainnet-performance-benchmark-scale-base-over-150m-gas-limit`
234
+
is the same `BenchmarkRun` ID across every metadata refresh, so URLs
235
+
are bookmarkable.
216
236
217
-
A cohort with fewer than 2 distinct buckets is dropped from the
218
-
dropdown — a "comparison" of one thing isn't a comparison.
237
+
**Source runs are not modified**: synthetic entries are deep clones
238
+
with rewritten `BenchmarkRun` and a `[Compare: …]` prefix on
239
+
`testName`. The originals continue to appear under their natural IDs.
219
240
220
241
## Producer responsibilities
221
242
222
243
A new producer (Rust, monorepo, whatever) needs to:
223
244
224
-
1.**Write one or more `metadata-<unique>.json` files** under
225
-
`s3://<bucket>/metadata/`. Filename only matters in that the
226
-
report-api lists everything ending in `.json` and processes it in
227
-
listing order (later writes deduplicate earlier ones on the
228
-
compound key `(id, outputDir)`).
229
-
2.**Write per-block metrics** to
230
-
`s3://<bucket>/<outputDir>/metrics-<role>.json` for each
231
-
`runs[].outputDir`. Use the role names the report knows
232
-
(`sequencer`, `validator`) so the frontend's per-role panels
233
-
populate, or document the custom role somewhere the user can find
234
-
it.
235
-
3.**Populate `testConfig.ClientVersion`** with a value distinct per
236
-
build. Without this, version-comparison groups can't form.
237
-
4.**Populate `createdAt`** as RFC3339. Required for retention and
0 commit comments