Skip to content

Commit 8b9bb08

Browse files
authored
feat: show size, compression ratio, and parquet ratio in benchmarks (#2607)
1 parent 2757d7b commit 8b9bb08

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

bench-vortex/src/compress/bench.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ where
8989
ratios.push(CustomUnitMeasurement {
9090
name: format!("vortex size/{}", bench_name),
9191
format: Format::OnDiskVortex,
92-
unit: Cow::from("value"),
92+
unit: Cow::from("bytes"),
9393
value: compressed_size_f64,
9494
});
9595
}

bench-vortex/src/measurements.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,9 @@ impl ToJson for CustomUnitMeasurement {
279279
JsonValue {
280280
name: self.name.clone(),
281281
storage: None,
282-
unit: None,
282+
unit: Some(self.unit.clone()),
283283
value: MeasurementValue::Float(self.value),
284+
// time & bytes are only used for throughputs
284285
time: None,
285286
bytes: None,
286287
commit_id: Cow::from(GIT_COMMIT_ID.as_str()),

benchmarks-website/code.js

+14-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ window.initAndRender = (function () {
3333
let groups = {
3434
"Random Access": new Map(),
3535
"Compression": new Map(),
36+
"Compression Size": new Map(),
3637
"TPC-H (NVME)": new Map(),
3738
"TPC-H (S3)": new Map(),
3839
"Clickbench": new Map(),
@@ -65,6 +66,17 @@ window.initAndRender = (function () {
6566
group = groups["Random Access"];
6667
} else if (name.includes("compress time/")) {
6768
group = groups["Compression"];
69+
} else if (name.startsWith("vortex size/")) {
70+
if (unit === null || unit === undefined) {
71+
unit = "bytes" // Unit information was missing before the commit that adds this comment.
72+
}
73+
group = groups["Compression Size"]
74+
} else if (name.startsWith("vortex:raw size/") ||
75+
name.startsWith("vortex:parquet-zstd size/")) {
76+
if (unit === null || unit === undefined) {
77+
unit = "ratio" // The unit becomes the y-axis label.
78+
}
79+
group = groups["Compression Size"]
6880
} else if (name.startsWith("tpch_q")) {
6981
if (storage === undefined || storage === "nvme") {
7082
group = groups["TPC-H (NVME)"];
@@ -91,7 +103,8 @@ window.initAndRender = (function () {
91103

92104
let prettyQ = q.replace("_", " ")
93105
.toUpperCase()
94-
.replace("VORTEX:RAW SIZE", "VORTEX COMPRESSION RATIO");
106+
.replace("VORTEX:RAW SIZE", "VORTEX COMPRESSION RATIO")
107+
.replace("VORTEX:PARQUET-ZSTD SIZE", "VORTEX:PARQUET-ZSTD SIZE RATIO");
95108
if (prettyQ.includes("PARQUET-UNC")) {
96109
return
97110
}

benchmarks-website/index.html

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
]),
3939
"renamedDatasets": undefined,
4040
}],
41+
["Compression Size", {
42+
"hiddenDatasets": new Set([
43+
"AirlineSentiment",
44+
]),
45+
}],
4146
["TPC-H (NVME)", {
4247
"keptCharts": undefined,
4348
"hiddenDatasets": undefined,

0 commit comments

Comments
 (0)