Skip to content

Commit 257fba7

Browse files
committed
Skip all benchmark stuff for Stable
1 parent acf1ad3 commit 257fba7

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,7 @@ test-coverage:
4545
.PHONY: wasm-examples
4646
wasm-examples:
4747
./build-wasm-examples.sh
48+
49+
.PHONY: bench
50+
bench:
51+
cargo +nightly bench --features=bench

crates/dogoap/Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@ homepage = "https://github.com/victorb/dogoap"
1010
bevy_reflect = "0.15.0"
1111
log = "0.4.22"
1212
pathfinding = "4.10.0"
13+
14+
15+
[features]
16+
# Define a feature for nightly usage
17+
bench = []

crates/dogoap/benches/long_plan.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(test)]
1+
#![cfg_attr(feature = "bench", feature(test))]
22

33
#[cfg(test)]
44
mod tests {
@@ -7,7 +7,9 @@ mod tests {
77
simple::{simple_decrement_action, simple_increment_action},
88
};
99

10+
#[cfg(feature = "bench")]
1011
extern crate test;
12+
#[cfg(feature = "bench")]
1113
use test::Bencher;
1214

1315
fn long_plan(strategy: PlanningStrategy) {
@@ -50,6 +52,7 @@ mod tests {
5052
assert_eq!(expected_state, effects.last().unwrap().state);
5153
}
5254

55+
#[cfg(feature = "bench")]
5356
#[bench]
5457
fn bench_start_to_goal_strategy(b: &mut Bencher) {
5558
b.iter(|| long_plan(PlanningStrategy::StartToGoal));

0 commit comments

Comments
 (0)