diff --git a/.gitignore b/.gitignore index 2a4642fd08..e690fffaad 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ Cargo.lock .cargo/config /.idea /.vscode +/benches/target \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index d2a4958158..1963f7816c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,6 +46,7 @@ members = [ "crates/*", "crates/bevy_ecs/hecs", ] +exclude = ["benches"] [dependencies] # bevy @@ -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" @@ -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 diff --git a/benches/Cargo.toml b/benches/Cargo.toml new file mode 100644 index 0000000000..f514104b2a --- /dev/null +++ b/benches/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "benches" +version = "0.1.0" +authors = ["Carter Anderson "] +edition = "2018" + +[dev-dependencies] +criterion = "0.3" +bevy = { path = "../" } + +[[bench]] +name = "iter" +path = "benches/bevy_tasks/iter.rs" +harness = false \ No newline at end of file diff --git a/crates/bevy_tasks/benches/iter.rs b/benches/benches/bevy_tasks/iter.rs similarity index 98% rename from crates/bevy_tasks/benches/iter.rs rename to benches/benches/bevy_tasks/iter.rs index b6bdd910a1..2c58adfc27 100644 --- a/crates/bevy_tasks/benches/iter.rs +++ b/benches/benches/bevy_tasks/iter.rs @@ -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>);