mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
fixed iai benchmarks
This commit is contained in:
parent
38f08e33ce
commit
07ad061ac0
4 changed files with 6 additions and 9 deletions
2
.github/workflows/benchmarks.yml
vendored
2
.github/workflows/benchmarks.yml
vendored
|
@ -21,4 +21,4 @@ jobs:
|
||||||
run: earthly --version
|
run: earthly --version
|
||||||
|
|
||||||
- name: install dependencies, build, cd cli, benchmark with iai and criterion
|
- name: install dependencies, build, cd cli, benchmark with iai and criterion
|
||||||
run: earthly +bench-roc
|
run: earthly --allow-privileged +bench-roc
|
||||||
|
|
|
@ -113,7 +113,8 @@ test-all:
|
||||||
|
|
||||||
bench-roc:
|
bench-roc:
|
||||||
FROM +copy-dirs-and-cache
|
FROM +copy-dirs-and-cache
|
||||||
|
ENV RUST_BACKTRACE=full
|
||||||
RUN cargo criterion -V
|
RUN cargo criterion -V
|
||||||
RUN --mount=type=cache,target=$SCCACHE_DIR \
|
RUN --privileged --mount=type=cache,target=$SCCACHE_DIR \
|
||||||
cd cli && cargo bench instructions_bench && cargo criterion --bench time_bench && sccache --show-stats
|
cd cli && cargo bench instructions_bench && cargo criterion --bench time_bench && sccache --show-stats
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
use criterion::{
|
|
||||||
black_box, measurement::WallTime, BenchmarkGroup
|
|
||||||
};
|
|
||||||
use crate::helpers::{example_file, run_cmd, run_roc};
|
use crate::helpers::{example_file, run_cmd, run_roc};
|
||||||
|
use criterion::{black_box, measurement::WallTime, BenchmarkGroup};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
// run without optimization, without input
|
// run without optimization, without input
|
||||||
|
@ -92,7 +90,6 @@ fn bench_cmd(
|
||||||
&[],
|
&[],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn bench_nqueens(bench_group_opt: Option<&mut BenchmarkGroup<WallTime>>) {
|
pub fn bench_nqueens(bench_group_opt: Option<&mut BenchmarkGroup<WallTime>>) {
|
||||||
|
@ -165,4 +162,4 @@ pub fn bench_closure(bench_group_opt: Option<&mut BenchmarkGroup<WallTime>>) {
|
||||||
"",
|
"",
|
||||||
bench_group_opt,
|
bench_group_opt,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
|
|
||||||
pub mod helpers;
|
|
||||||
pub mod bench_utils;
|
pub mod bench_utils;
|
||||||
|
pub mod helpers;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue