Skip to content

Commit

Permalink
move benches to separate crate to cut test/example build times
Browse files Browse the repository at this point in the history
  • Loading branch information
cart authored and mrk-its committed Oct 6, 2020
1 parent 64f8b66 commit 164aed6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Cargo.lock
.cargo/config
/.idea
/.vscode
/benches/target
7 changes: 1 addition & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ members = [
"crates/*",
"crates/bevy_ecs/hecs",
]
exclude = ["benches"]

[dependencies]
# bevy
Expand Down Expand Up @@ -78,7 +79,6 @@ bevy_winit = { path = "crates/bevy_winit", optional = true, version = "0.1" }
[dev-dependencies]
rand = "0.7.2"
serde = { version = "1", features = ["derive"]}
criterion = "0.3"

[[example]]
name = "hello_world"
Expand Down Expand Up @@ -247,8 +247,3 @@ path = "examples/window/multiple_windows.rs"
[[example]]
name = "window_settings"
path = "examples/window/window_settings.rs"

[[bench]]
name = "iter"
path = "crates/bevy_tasks/benches/iter.rs"
harness = false
14 changes: 14 additions & 0 deletions benches/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "benches"
version = "0.1.0"
authors = ["Carter Anderson <[email protected]>"]
edition = "2018"

[dev-dependencies]
criterion = "0.3"
bevy = { path = "../" }

[[bench]]
name = "iter"
path = "benches/bevy_tasks/iter.rs"
harness = false
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use bevy_tasks::{ParallelIterator, TaskPoolBuilder};
use bevy::tasks::{ParallelIterator, TaskPoolBuilder};
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};

struct ParChunks<'a, T>(std::slice::Chunks<'a, T>);
Expand Down

0 comments on commit 164aed6

Please sign in to comment.