mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
move benches to separate crate to cut test/example build times
This commit is contained in:
parent
ac117019e2
commit
9c850057c0
4 changed files with 17 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@ Cargo.lock
|
|||
.cargo/config
|
||||
/.idea
|
||||
/.vscode
|
||||
/benches/target
|
|
@ -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
|
||||
|
|
14
benches/Cargo.toml
Normal file
14
benches/Cargo.toml
Normal file
|
@ -0,0 +1,14 @@
|
|||
[package]
|
||||
name = "benches"
|
||||
version = "0.1.0"
|
||||
authors = ["Carter Anderson <mcanders1@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.3"
|
||||
bevy = { path = "../" }
|
||||
|
||||
[[bench]]
|
||||
name = "iter"
|
||||
path = "benches/bevy_tasks/iter.rs"
|
||||
harness = false
|
|
@ -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>);
|
Loading…
Reference in a new issue