From b99a68ace049a6d9f9e40e9194ce2e6f1c351066 Mon Sep 17 00:00:00 2001 From: Will Manning Date: Sat, 21 Nov 2026 18:48:11 -0500 Subject: [PATCH] Name bench's throughput groups Compression Speed and String Encoding Speed Each pairs with its size group (Compression & File Size, String Encoding Size), so the names now say which one measures speed. The page anchors stay #compression and #string-encoding, so shared links still land, and the homepage still reads the scan and write panels from the old name while production bench serves it. Signed-off-by: Will Manning --- docs/bench/CONTRACT.md | 4 ++-- docs/bench/architecture/read-path.md | 2 +- src/bench/lib/anchor.test.ts | 2 ++ src/bench/lib/anchor.ts | 4 +++- src/bench/lib/data-cache.test.ts | 8 ++++---- src/bench/lib/data-cache.ts | 2 +- src/bench/lib/descriptions.test.ts | 2 +- src/bench/lib/descriptions.ts | 4 ++-- src/bench/lib/groups.test.ts | 22 +++++++++++----------- src/bench/lib/queries.test.ts | 22 ++++++++++++---------- src/bench/lib/queries.ts | 8 ++++---- src/bench/lib/site-files.test.ts | 8 ++++---- src/bench/lib/summary.ts | 2 +- src/lib/bench-summary.ts | 6 ++++-- tests/unit/bench-summary.test.ts | 18 ++++++++++++------ tests/unit/fixtures/bench-groups.json | 2 +- 16 files changed, 65 insertions(+), 51 deletions(-) diff --git a/docs/bench/CONTRACT.md b/docs/bench/CONTRACT.md index adcc64f..b01ca00 100644 --- a/docs/bench/CONTRACT.md +++ b/docs/bench/CONTRACT.md @@ -74,8 +74,8 @@ timed. dataset `strings/`, the string encoder (`onpair-12`, `fsst`, ...) as `dataset_variant`, and `vortex-file-compressed` as `format`; `encode` is the Vortex file write and `decode` the scan. Its `uncompressed_bytes` is the column's canonical Arrow `Utf8View` size. The site lists these -rows in the `String Encoding` groups and compares each encoder with `fsst`, so the prefix and the -`fsst` label are part of the contract. +rows in the `String Encoding Speed` and `String Encoding Size` groups and compares each encoder +with `fsst`, so the prefix and the `fsst` label are part of the contract. `file_size` records are not written by `vortex-bench`: the monorepo's `scripts/capture-file-sizes.py` writes one per data file a SQL benchmark leaves on disk, with diff --git a/docs/bench/architecture/read-path.md b/docs/bench/architecture/read-path.md index 32a83b5..d63c1d0 100644 --- a/docs/bench/architecture/read-path.md +++ b/docs/bench/architecture/read-path.md @@ -120,7 +120,7 @@ the v3 Axum server (so the frontend is generation-agnostic). The landing-page order is the curated `GROUP_ORDER` in `queries.ts`: ``` -Compression, Compression & File Size, Random Access, Clickbench, +Compression Speed, Compression & File Size, Random Access, Clickbench, TPC-H (NVMe/S3) SF=1, SF=10, SF=100 (alternating), TPC-DS (NVMe) SF=1, Statistical and Population Genetics, Polar Signals Profiling, diff --git a/src/bench/lib/anchor.test.ts b/src/bench/lib/anchor.test.ts index ae3b3aa..94825d0 100644 --- a/src/bench/lib/anchor.test.ts +++ b/src/bench/lib/anchor.test.ts @@ -41,6 +41,8 @@ describe('groupAnchors', () => { expect(groupAnchor('Polar Signals Profiling')).toBe('polarsignals-profiling'); expect(groupAnchor('Compression & File Size')).toBe('compression-size'); expect(groupAnchor('SQL Benchmark File Sizes')).toBe('sql-file-size'); + expect(groupAnchor('Compression Speed')).toBe('compression'); + expect(groupAnchor('String Encoding Speed')).toBe('string-encoding'); }); it('keeps the full production group list collision-free', () => { diff --git a/src/bench/lib/anchor.ts b/src/bench/lib/anchor.ts index 1c47f63..db02769 100644 --- a/src/bench/lib/anchor.ts +++ b/src/bench/lib/anchor.ts @@ -15,10 +15,12 @@ * Anchors that stay as they were when a group's name changed, so links that * readers already shared still land on the group. The groups were named * "PolarSignals Profiling" (until its owners' spelling replaced it), - * "Compression Size", and "SQL File Size". + * "Compression", "Compression Size", "SQL File Size", and "String Encoding". */ const KEPT_ANCHORS: Readonly> = { 'Polar Signals Profiling': 'polarsignals-profiling', + 'Compression Speed': 'compression', + 'String Encoding Speed': 'string-encoding', 'Compression & File Size': 'compression-size', 'SQL Benchmark File Sizes': 'sql-file-size', }; diff --git a/src/bench/lib/data-cache.test.ts b/src/bench/lib/data-cache.test.ts index 414cf66..5a06471 100644 --- a/src/bench/lib/data-cache.test.ts +++ b/src/bench/lib/data-cache.test.ts @@ -69,10 +69,10 @@ describe('data-cache wrappers', () => { expect(BENCH_DATA_TAG).toBe('bench-data'); expect(DATA_CACHE_BACKSTOP_SECONDS).toBe(86400); expect(cacheCalls.map((call) => call.keyParts)).toEqual([ - ['data-cache:group-charts:v20:n100'], - ['data-cache:chart-payload:v20:n100'], - ['data-cache:groups:v20'], - ['data-cache:filter-universe:v20'], + ['data-cache:group-charts:v21:n100'], + ['data-cache:chart-payload:v21:n100'], + ['data-cache:groups:v21'], + ['data-cache:filter-universe:v21'], ]); for (const call of cacheCalls) { expect(call.options.tags).toEqual([BENCH_DATA_TAG]); diff --git a/src/bench/lib/data-cache.ts b/src/bench/lib/data-cache.ts index 5dda1cf..710b0c5 100644 --- a/src/bench/lib/data-cache.ts +++ b/src/bench/lib/data-cache.ts @@ -59,7 +59,7 @@ const CACHE_OPTIONS = { tags: [BENCH_DATA_TAG], revalidate: DATA_CACHE_BACKSTOP_ * computed until the next ingest. * It is independent of the producer-facing benchmark schema version. */ -const GROUP_PAYLOAD_CACHE_VERSION = 'v20'; +const GROUP_PAYLOAD_CACHE_VERSION = 'v21'; // The default last-100 group bundle, keyed by group slug. The slug is the cache // key (an `unstable_cache` argument), so one wrapper covers every group. A diff --git a/src/bench/lib/descriptions.test.ts b/src/bench/lib/descriptions.test.ts index 0aed3c4..d069754 100644 --- a/src/bench/lib/descriptions.test.ts +++ b/src/bench/lib/descriptions.test.ts @@ -17,7 +17,7 @@ describe('groupDescription', () => { expect(groupDescription('Random Access')).toBe( 'Tests performance of selecting arbitrary row indices from a file on NVMe storage', ); - expect(groupDescription('Compression')).toBe( + expect(groupDescription('Compression Speed')).toBe( 'Measures write and scan throughput for Vortex, Parquet, and Lance files', ); expect(groupDescription('Compression & File Size')).toBe( diff --git a/src/bench/lib/descriptions.ts b/src/bench/lib/descriptions.ts index f262a93..350a2b9 100644 --- a/src/bench/lib/descriptions.ts +++ b/src/bench/lib/descriptions.ts @@ -44,7 +44,7 @@ function staticDescription(name: string): string | null { return 'Tests performance of selecting arbitrary row indices from a file on NVMe storage'; case 'Random Access (S3)': return 'Tests performance of selecting arbitrary row indices from a file on S3 storage'; - case 'Compression': + case 'Compression Speed': return 'Measures write and scan throughput for Vortex, Parquet, and Lance files'; case 'Compression & File Size': return ( @@ -58,7 +58,7 @@ function staticDescription(name: string): string | null { 'ranks formats against Parquet on the benchmarks that write Parquet with bench’s ' + 'settings, each benchmark once. Compression & File Size compares the formats’ compression' ); - case 'String Encoding': + case 'String Encoding Speed': return 'Measures Vortex file write and scan throughput for each string encoder'; case 'String Encoding Size': return 'Compares Vortex file sizes for each string encoder'; diff --git a/src/bench/lib/groups.test.ts b/src/bench/lib/groups.test.ts index 053c7db..0b0da6b 100644 --- a/src/bench/lib/groups.test.ts +++ b/src/bench/lib/groups.test.ts @@ -74,7 +74,7 @@ describe.skipIf(!databaseAvailable)( const groups = await collectGroups(); // Random-access sections precede Clickbench in GROUP_ORDER. expect(groups.map((g) => g.name)).toEqual([ - 'Compression', + 'Compression Speed', 'Compression & File Size', 'Random Access (NVMe)', 'TPC-H (NVMe) (SF=1)', @@ -144,7 +144,7 @@ describe.skipIf(!databaseAvailable)( it('computes compression rankings with Parquet and Lance baselines', async () => { const groups = await collectGroups(); const summary = expectDefined( - groups.find((g) => g.name === 'Compression')?.summary, + groups.find((g) => g.name === 'Compression Speed')?.summary, 'compression summary', ); if (summary.type !== 'compression') { @@ -251,7 +251,7 @@ describe.skipIf(!databaseAvailable)( expect(res.headers.get('cache-control')).toBe(READ_API_CACHE_CONTROL); const body = (await res.json()) as GroupsResponse; expect(body.groups.map((g) => g.name)).toEqual([ - 'Compression', + 'Compression Speed', 'Compression & File Size', 'Random Access (NVMe)', 'TPC-H (NVMe) (SF=1)', @@ -566,30 +566,30 @@ describe.skipIf(!databaseAvailable)('summary math fidelity (testcontainers Postg const groups = await collectGroups(); expect(groups.map((group) => group.name)).toEqual([ - 'Compression', + 'Compression Speed', 'Compression & File Size', - 'String Encoding', + 'String Encoding Speed', 'String Encoding Size', ]); const byName = new Map(groups.map((group) => [group.name, group])); - expect(groupKeyFromSlug(defined(byName.get('Compression')).slug)).toEqual({ + expect(groupKeyFromSlug(defined(byName.get('Compression Speed')).slug)).toEqual({ k: 'CompressionTimeGroup', }); - expect(defined(byName.get('Compression')).charts.map((chart) => chart.name)).toEqual([ + expect(defined(byName.get('Compression Speed')).charts.map((chart) => chart.name)).toEqual([ 'tpch-lineitem', ]); - expect(defined(byName.get('Compression')).summary).toMatchObject({ + expect(defined(byName.get('Compression Speed')).summary).toMatchObject({ type: 'compression', rankings: [ { name: 'vortex-file-compressed', operation: 'encode', ratio: 2 }, { name: 'parquet', operation: 'encode', ratio: 1 }, ], }); - expect(groupKeyFromSlug(defined(byName.get('String Encoding')).slug)).toEqual({ + expect(groupKeyFromSlug(defined(byName.get('String Encoding Speed')).slug)).toEqual({ k: 'CompressionTimeGroup', suite: 'strings', }); - expect(defined(byName.get('String Encoding')).charts).toEqual( + expect(defined(byName.get('String Encoding Speed')).charts).toEqual( ['fsst', 'onpair-12'].map((encoder) => ({ name: `fineweb/text/${encoder}`, slug: chartKeyToSlug({ @@ -599,7 +599,7 @@ describe.skipIf(!databaseAvailable)('summary math fidelity (testcontainers Postg }), })), ); - expect(defined(byName.get('String Encoding')).summary).toMatchObject({ + expect(defined(byName.get('String Encoding Speed')).summary).toMatchObject({ type: 'compression', rankings: [ { name: 'onpair-12', operation: 'encode', ratio: 2, throughputGbS: 6 }, diff --git a/src/bench/lib/queries.test.ts b/src/bench/lib/queries.test.ts index 62aec07..c67488e 100644 --- a/src/bench/lib/queries.test.ts +++ b/src/bench/lib/queries.test.ts @@ -348,10 +348,10 @@ describe('compareGroupSortKey canonical group ordering (no DB)', () => { 'Random Access (S3)', 'Random Access (NVMe)', 'Clickbench', - 'Compression', + 'Compression Speed', ].sort(compareGroupSortKey); expect(sorted).toEqual([ - 'Compression', + 'Compression Speed', 'Random Access (NVMe)', 'Random Access (S3)', 'Clickbench', @@ -361,11 +361,13 @@ describe('compareGroupSortKey canonical group ordering (no DB)', () => { }); it('sorts listed groups before unknown groups, unknowns alphabetically last', () => { - const sorted = ['cohere-large-10m / partitioned', 'Random Access (NVMe)', 'Compression'].sort( - compareGroupSortKey, - ); + const sorted = [ + 'cohere-large-10m / partitioned', + 'Random Access (NVMe)', + 'Compression Speed', + ].sort(compareGroupSortKey); expect(sorted).toEqual([ - 'Compression', + 'Compression Speed', 'Random Access (NVMe)', 'cohere-large-10m / partitioned', ]); @@ -376,18 +378,18 @@ describe('compareGroupSortKey canonical group ordering (no DB)', () => { 'String Encoding Size', 'Clickbench', 'cohere-large-10m / partitioned', - 'String Encoding', + 'String Encoding Speed', 'Random Access (NVMe)', 'Compression & File Size', - 'Compression', + 'Compression Speed', ].sort(compareGroupSortKey); expect(sorted).toEqual([ - 'Compression', + 'Compression Speed', 'Compression & File Size', 'Random Access (NVMe)', 'Clickbench', 'cohere-large-10m / partitioned', - 'String Encoding', + 'String Encoding Speed', 'String Encoding Size', ]); }); diff --git a/src/bench/lib/queries.ts b/src/bench/lib/queries.ts index 58c011f..d15315c 100644 --- a/src/bench/lib/queries.ts +++ b/src/bench/lib/queries.ts @@ -1308,7 +1308,7 @@ export interface GroupChartsResponse { * [`GROUP_ORDER_LAST`]. */ const GROUP_ORDER: readonly string[] = [ - 'Compression', + 'Compression Speed', 'Compression & File Size', 'Random Access (NVMe)', 'Random Access (S3)', @@ -1337,7 +1337,7 @@ const GROUP_ORDER: readonly string[] = [ */ const GROUP_ORDER_LAST: readonly string[] = [ 'SQL Benchmark File Sizes', - 'String Encoding', + 'String Encoding Speed', 'String Encoding Size', ]; @@ -1604,7 +1604,7 @@ type DatasetVariantRow = { dataset: string; dataset_variant: string | null }; * names only `string-bench`'s group here. */ const COMPRESSION_GROUP_NAMES = { - CompressionTimeGroup: { compress: 'Compression', strings: 'String Encoding' }, + CompressionTimeGroup: { compress: 'Compression Speed', strings: 'String Encoding Speed' }, CompressionSizeGroup: { strings: 'String Encoding Size' }, } as const; @@ -1656,7 +1656,7 @@ function compressionGroups( }); } -/** The `Compression` and `String Encoding` groups, or `[]` if the fact table is empty. */ +/** The `Compression Speed` and `String Encoding Speed` groups, or `[]` if the fact table is empty. */ async function collectCompressionTimeGroup(): Promise { const text = ` SELECT dataset, dataset_variant diff --git a/src/bench/lib/site-files.test.ts b/src/bench/lib/site-files.test.ts index 47c7b55..dbf1b89 100644 --- a/src/bench/lib/site-files.test.ts +++ b/src/bench/lib/site-files.test.ts @@ -21,7 +21,7 @@ const VX = 'vortex-file-compressed'; const groups: Group[] = [ { - name: 'Compression', + name: 'Compression Speed', slug: 'ctg.eyJrIjoiQ29tcHJlc3Npb25UaW1lR3JvdXAifQ', charts: [{ name: 'taxi', slug: 'ct.taxi' }], description: 'Measures write and scan throughput for Vortex, Parquet, and Lance files', @@ -219,12 +219,12 @@ describe('llmsText', () => { it("gives each group's headline, rankings and links", () => { expect(text).toContain( - '### Compression\n\nMeasures write and scan throughput for Vortex, Parquet, and Lance files.', + '### Compression Speed\n\nMeasures write and scan throughput for Vortex, Parquet, and Lance files.', ); expect(text).toContain('Vortex compared with Parquet: '); expect(text).toContain('- [Clickbench charts](https://bench.vortex.dev/#clickbench)'); expect(text).toContain( - '- [What Compression measures](https://github.com/vortex-data/vortex/blob/develop/benchmarks/compress-bench/README.md)', + '- [What Compression Speed measures](https://github.com/vortex-data/vortex/blob/develop/benchmarks/compress-bench/README.md)', ); }); }); @@ -261,6 +261,6 @@ describe('chartDescription', () => { describe('the Dataset JSON-LD', () => { it('names every group as a variable measured', () => { - expect(datasetJsonLd(groups).variableMeasured).toEqual(['Compression', 'Clickbench']); + expect(datasetJsonLd(groups).variableMeasured).toEqual(['Compression Speed', 'Clickbench']); }); }); diff --git a/src/bench/lib/summary.ts b/src/bench/lib/summary.ts index b126394..905470f 100644 --- a/src/bench/lib/summary.ts +++ b/src/bench/lib/summary.ts @@ -1066,7 +1066,7 @@ async function compressionSizeSamples(): Promise { } /** - * The `String Encoding` rollup: each string encoder's write (`encode`) and scan (`decode`) + * The `String Encoding Speed` rollup: each string encoder's write (`encode`) and scan (`decode`) * throughput against FSST's, on the columns both measured at the newest `string-bench` commit. * The suite runs every encoder in one job, so one commit is a complete snapshot. */ diff --git a/src/lib/bench-summary.ts b/src/lib/bench-summary.ts index 97c29b3..711521b 100644 --- a/src/lib/bench-summary.ts +++ b/src/lib/bench-summary.ts @@ -137,7 +137,8 @@ const SOURCES: (Source | Panel)[] = [ unit: "× Parquet", kind: "speed", better: "higher", - group: "Compression", + group: "Compression Speed", + formerGroups: ["Compression"], rankings: (s) => s.rankings, name: (f) => f, where: { operation: "decode" }, @@ -150,7 +151,8 @@ const SOURCES: (Source | Panel)[] = [ unit: "× Parquet", kind: "speed", better: "higher", - group: "Compression", + group: "Compression Speed", + formerGroups: ["Compression"], rankings: (s) => s.rankings, name: (f) => f, where: { operation: "encode" }, diff --git a/tests/unit/bench-summary.test.ts b/tests/unit/bench-summary.test.ts index e14cd9e..883bf03 100644 --- a/tests/unit/bench-summary.test.ts +++ b/tests/unit/bench-summary.test.ts @@ -222,7 +222,7 @@ describe("panelsFrom", () => { it("keeps a system bench did not report, as Not measured", () => { const gs = groups(); - const compression = group(gs, "Compression").summary; + const compression = group(gs, "Compression Speed").summary; compression.rankings = (compression.rankings ?? []).filter( (r) => !(r.name === "lance" && r.operation === "decode") ); @@ -335,7 +335,7 @@ describe("panelsFrom", () => { it("gives null when no system in a group has a score", () => { const gs = groups(); - for (const r of group(gs, "Compression").summary.rankings ?? []) + for (const r of group(gs, "Compression Speed").summary.rankings ?? []) r.ratio = 0; assert.equal(panelsFrom(gs, charts()), null); }); @@ -380,9 +380,15 @@ describe("panelsFrom", () => { assert.deepEqual(panelsFrom(gs, charts()), panelsFrom(groups(), charts())); }); + it("reads the scan and write panels from the group's earlier name", () => { + const gs = groups(); + group(gs, "Compression Speed").name = "Compression"; + assert.deepEqual(panelsFrom(gs, charts()), panelsFrom(groups(), charts())); + }); + it("gives null when a group is missing, so the card never shows part of the table", () => { for (const name of [ - "Compression", + "Compression Speed", "Compression & File Size", "Random Access (NVMe)", "Clickbench", @@ -400,9 +406,9 @@ describe("panelsFrom", () => { // Arrow alone is shown only where bench runs it, so a scan ranking that // listed only Arrow still counts as none. const only = groups(); - group(only, "Compression").summary.rankings = [ + group(only, "Compression Speed").summary.rankings = [ { name: "arrow-ipc", operation: "decode", ratio: 2 }, - ...(group(only, "Compression").summary.rankings ?? []).filter( + ...(group(only, "Compression Speed").summary.rankings ?? []).filter( (r) => r.operation === "encode" ) ]; @@ -420,7 +426,7 @@ describe("panelsFrom", () => { "groups", {}, [null], - [{ name: "Compression", summary: null }] + [{ name: "Compression Speed", summary: null }] ]) { assert.equal(panelsFrom(bad, charts()), null, JSON.stringify(bad)); } diff --git a/tests/unit/fixtures/bench-groups.json b/tests/unit/fixtures/bench-groups.json index 634b948..759644e 100644 --- a/tests/unit/fixtures/bench-groups.json +++ b/tests/unit/fixtures/bench-groups.json @@ -1,7 +1,7 @@ { "groups": [ { - "name": "Compression", + "name": "Compression Speed", "slug": "ctg.eyJrIjoiQ29tcHJlc3Npb25UaW1lR3JvdXAifQ", "summary": { "type": "compression",