Skip to content

Commit b852b1b

Browse files
join: add benchmark with the French locale (#10025)
1 parent 8cb4f30 commit b852b1b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/uu/join/benches/join_bench.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,22 @@ fn join_custom_separator(bencher: Bencher) {
110110
});
111111
}
112112

113+
/// Benchmark join with French locale (fr_FR.UTF-8)
114+
#[divan::bench]
115+
fn join_french_locale(bencher: Bencher) {
116+
let num_lines = 10000;
117+
let temp_dir = TempDir::new().unwrap();
118+
let (file1, file2) = create_join_files(&temp_dir, num_lines);
119+
120+
bencher
121+
.with_inputs(|| unsafe {
122+
std::env::set_var("LC_ALL", "fr_FR.UTF-8");
123+
})
124+
.bench_values(|_| {
125+
black_box(run_util_function(uumain, &[&file1, &file2]));
126+
});
127+
}
128+
113129
fn main() {
114130
divan::main();
115131
}

0 commit comments

Comments
 (0)