Skip to content

Commit d6f1f4e

Browse files
committed
vortex-row: rustfmt the fsst row-encode benchmark
Apply nightly rustfmt formatting to the FSST benchmark added in the previous commit. Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent b97b7e4 commit d6f1f4e

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

vortex-row/benches/fsst_row_encode.rs

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,17 @@ fn main() {
8989
fn fsst_unpack_then_convert(bencher: divan::Bencher) {
9090
let (fsst, total_bytes) = build_fsst();
9191
let encoder = RowEncoder::default();
92-
bencher.counter(BytesCount::new(total_bytes)).bench_local(|| {
93-
let mut ctx = LEGACY_SESSION.create_execution_ctx();
94-
let decoded = fsst.clone().execute::<Canonical>(&mut ctx).unwrap().into_array();
95-
encoder.encode(&[decoded], &mut ctx).unwrap()
96-
});
92+
bencher
93+
.counter(BytesCount::new(total_bytes))
94+
.bench_local(|| {
95+
let mut ctx = LEGACY_SESSION.create_execution_ctx();
96+
let decoded = fsst
97+
.clone()
98+
.execute::<Canonical>(&mut ctx)
99+
.unwrap()
100+
.into_array();
101+
encoder.encode(&[decoded], &mut ctx).unwrap()
102+
});
97103
}
98104

99105
/// Irreducible floor: FSST decompression alone (a direct kernel must still produce these
@@ -113,8 +119,12 @@ fn plain_row_encode_only(bencher: divan::Bencher) {
113119
let (fsst, total_bytes) = build_fsst();
114120
let decoded = decompress(&fsst);
115121
let encoder = RowEncoder::default();
116-
bencher.counter(BytesCount::new(total_bytes)).bench_local(|| {
117-
let mut ctx = LEGACY_SESSION.create_execution_ctx();
118-
encoder.encode(std::slice::from_ref(&decoded), &mut ctx).unwrap()
119-
});
122+
bencher
123+
.counter(BytesCount::new(total_bytes))
124+
.bench_local(|| {
125+
let mut ctx = LEGACY_SESSION.create_execution_ctx();
126+
encoder
127+
.encode(std::slice::from_ref(&decoded), &mut ctx)
128+
.unwrap()
129+
});
120130
}

0 commit comments

Comments
 (0)