Skip to content

Commit 573c6b3

Browse files
committed
chore(benchmarks-website): add doc comments to public Rust items
CLAUDE.md requires every public API definition to carry a doc comment. Sweep the v3 server and migrator for `pub` items that landed without one and add a one-liner that says what each is for — no essays. Items touched: - `vortex-bench-server::api`: GroupsResponse, Group, ChartLink, ChartResponse, CommitPoint, HealthResponse, RowCounts (every wire shape on the public read API now has a doc). - `vortex-bench-migrate::lib`: per-`pub mod` summaries on classifier, commits, migrate, source, v2, verify. - `vortex-bench-migrate::v2::V2Person`: author/committer block. - `vortex-bench-migrate::verify::ChartDiff`: per-group chart-count divergence row. No code changes. `cargo build -p vortex-bench-server -p vortex-bench-migrate` is clean. Signed-off-by: Claude <noreply@anthropic.com>
1 parent 836b017 commit 573c6b3

4 files changed

Lines changed: 21 additions & 0 deletions

File tree

benchmarks-website/migrate/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@
1313
//! The migrator is throwaway: once v3 cuts over, both the binary and
1414
//! the classifier go away.
1515
16+
/// Routing v2 records into v3 fact tables, ported from v2's `getGroup`.
1617
pub mod classifier;
18+
/// V2 commit -> v3 `commits` row upserts.
1719
pub mod commits;
20+
/// End-to-end migration of v2 dumps into a v3 DuckDB.
1821
pub mod migrate;
22+
/// Streaming readers for the v2 S3 bucket and local dumps.
1923
pub mod source;
24+
/// Wire shapes of the v2 benchmark dataset.
2025
pub mod v2;
26+
/// Structural diff between a migrated v3 DuckDB and v2's `/api/metadata`.
2127
pub mod verify;

benchmarks-website/migrate/src/v2.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ pub struct V2Commit {
137137
pub url: Option<String>,
138138
}
139139

140+
/// Author or committer block on a v2 commit record.
140141
#[derive(Debug, Clone, Deserialize)]
141142
pub struct V2Person {
142143
#[serde(default)]

benchmarks-website/migrate/src/verify.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ pub struct VerifyReport {
3030
pub chart_diffs: Vec<ChartDiff>,
3131
}
3232

33+
/// One group's chart-count divergence between v2 and v3, captured when the
34+
/// group is structurally present on both sides but the counts differ.
3335
#[derive(Debug, Clone)]
3436
pub struct ChartDiff {
3537
pub group: String,

benchmarks-website/server/src/api.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,14 @@ impl ChartQuery {
162162
}
163163
}
164164

165+
/// Body of `GET /api/groups`: every group with its chart links and summary.
165166
#[derive(Debug, Serialize)]
166167
pub struct GroupsResponse {
167168
pub groups: Vec<Group>,
168169
}
169170

171+
/// One group: a display name, a slug for the group permalink, and the chart
172+
/// links inside it. Optionally carries a v2-compatible rollup summary.
170173
#[derive(Debug, Serialize)]
171174
pub struct Group {
172175
pub name: String,
@@ -268,12 +271,16 @@ pub struct NamedChartResponse {
268271
pub chart: ChartResponse,
269272
}
270273

274+
/// One chart's short label inside a group (e.g. `Q1`) plus the slug that
275+
/// resolves to its `/api/chart/{slug}` payload.
271276
#[derive(Debug, Serialize)]
272277
pub struct ChartLink {
273278
pub name: String,
274279
pub slug: String,
275280
}
276281

282+
/// Body of `GET /api/chart/{slug}`: every commit with data, every series'
283+
/// values aligned to those commits, and per-series engine/format tags.
277284
#[derive(Debug, Clone, Serialize)]
278285
pub struct ChartResponse {
279286
pub display_name: String,
@@ -311,6 +318,8 @@ pub struct FilterUniverse {
311318
pub formats: Vec<String>,
312319
}
313320

321+
/// One row of the `commits[]` array on a [`ChartResponse`]. Carries enough
322+
/// metadata for the tooltip and the click-to-PR handler in `chart-init.js`.
314323
#[derive(Debug, Clone, Serialize)]
315324
pub struct CommitPoint {
316325
pub sha: String,
@@ -319,6 +328,8 @@ pub struct CommitPoint {
319328
pub url: String,
320329
}
321330

331+
/// Body of `GET /health`: liveness probe plus a row-count rollup that's
332+
/// useful for "did my ingest land?" smoke tests.
322333
#[derive(Debug, Serialize)]
323334
pub struct HealthResponse {
324335
pub status: &'static str,
@@ -328,6 +339,7 @@ pub struct HealthResponse {
328339
pub row_counts: RowCounts,
329340
}
330341

342+
/// Per-fact-table row counts surfaced by `/health`.
331343
#[derive(Debug, Serialize)]
332344
pub struct RowCounts {
333345
pub commits: i64,

0 commit comments

Comments
 (0)