Skip to content

Commit

Permalink
test(rsjudge-judger): ✅ use logarithmic scale
Browse files Browse the repository at this point in the history
  • Loading branch information
Jisu-Woniu committed Jun 10, 2024
1 parent 1820a95 commit 7750e36
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: recursive
- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion crates/rsjudge-judger/benches/data
Submodule data updated 11 files
+11 −0 .gitattributes
+3 −1 16k
+3 −1 16k.trim
+3 −1 1k
+3 −1 1k.trim
+3 −1 256k
+3 −1 256k.trim
+3 −1 4M
+3 −1 4M.trim
+3 −1 64M
+3 −1 64M.trim
5 changes: 3 additions & 2 deletions crates/rsjudge-judger/benches/default_comparer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::{hint::black_box, io, path::Path};

use criterion::{
criterion_group, criterion_main, BenchmarkId, Criterion, SamplingMode, Throughput,
criterion_group, criterion_main, AxisScale, BenchmarkId, Criterion, PlotConfiguration,
Throughput,
};
use rsjudge_judger::{comparer::DefaultComparer, Comparer as _};
use tokio::{fs::File, runtime::Runtime};
Expand All @@ -20,7 +21,7 @@ fn bench(c: &mut Criterion) {
];

let mut group = c.benchmark_group("DefaultComparer");
group.sampling_mode(SamplingMode::Flat);
group.plot_config(PlotConfiguration::default().summary_scale(AxisScale::Logarithmic));
for (size_str, bytes) in [
("1k", KILO),
("16k", 16 * KILO),
Expand Down

0 comments on commit 7750e36

Please sign in to comment.