Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/bench/CONTRACT.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ timed.
dataset `strings/<column>`, 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
Expand Down
2 changes: 1 addition & 1 deletion docs/bench/architecture/read-path.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/bench/lib/anchor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
4 changes: 3 additions & 1 deletion src/bench/lib/anchor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Record<string, string>> = {
'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',
};
Expand Down
8 changes: 4 additions & 4 deletions src/bench/lib/data-cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion src/bench/lib/data-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/bench/lib/descriptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions src/bench/lib/descriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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';
Expand Down
22 changes: 11 additions & 11 deletions src/bench/lib/groups.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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)',
Expand Down Expand Up @@ -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({
Expand All @@ -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 },
Expand Down
22 changes: 12 additions & 10 deletions src/bench/lib/queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
]);
Expand All @@ -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',
]);
});
Expand Down
8 changes: 4 additions & 4 deletions src/bench/lib/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
Expand Down Expand Up @@ -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',
];

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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<Group[]> {
const text = `
SELECT dataset, dataset_variant
Expand Down
8 changes: 4 additions & 4 deletions src/bench/lib/site-files.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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)',
);
});
});
Expand Down Expand Up @@ -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']);
});
});
2 changes: 1 addition & 1 deletion src/bench/lib/summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ async function compressionSizeSamples(): Promise<CompressionSizeSample[]> {
}

/**
* 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.
*/
Expand Down
6 changes: 4 additions & 2 deletions src/lib/bench-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand All @@ -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" },
Expand Down
18 changes: 12 additions & 6 deletions tests/unit/bench-summary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
);
Expand Down Expand Up @@ -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);
});
Expand Down Expand Up @@ -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",
Expand All @@ -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"
)
];
Expand All @@ -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));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/fixtures/bench-groups.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"groups": [
{
"name": "Compression",
"name": "Compression Speed",
"slug": "ctg.eyJrIjoiQ29tcHJlc3Npb25UaW1lR3JvdXAifQ",
"summary": {
"type": "compression",
Expand Down
Loading