forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ECS benchmarks organization (bevyengine#5189)
## Objective Fixes: bevyengine#5110 ## Solution - Moved benches into separate modules according to the part of ECS they are testing. - Made so all ECS benches are included in one `benches.rs` so they don’t need to be added separately in `Cargo.toml`. - Renamed a bunch of files to have more coherent names. - Merged `schedule.rs` and `system_schedule.rs` into one file.
- Loading branch information
1 parent
153ce8f
commit 8fd91f0
Showing
41 changed files
with
613 additions
and
640 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use criterion::criterion_main; | ||
|
||
mod components; | ||
mod iteration; | ||
mod scheduling; | ||
mod world; | ||
|
||
criterion_main!( | ||
iteration::iterations_benches, | ||
components::components_benches, | ||
scheduling::scheduling_benches, | ||
world::world_benches, | ||
); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
use criterion::*; | ||
|
||
mod add_remove_big_sparse_set; | ||
mod add_remove_big_table; | ||
mod add_remove_sparse_set; | ||
mod add_remove_table; | ||
mod archetype_updates; | ||
mod insert_simple; | ||
mod insert_simple_unbatched; | ||
|
||
use archetype_updates::*; | ||
|
||
criterion_group!( | ||
components_benches, | ||
add_remove, | ||
add_remove_big, | ||
insert_simple, | ||
no_archetypes, | ||
added_archetypes, | ||
); | ||
|
||
fn add_remove(c: &mut Criterion) { | ||
let mut group = c.benchmark_group("add_remove"); | ||
group.warm_up_time(std::time::Duration::from_millis(500)); | ||
group.measurement_time(std::time::Duration::from_secs(4)); | ||
group.bench_function("table", |b| { | ||
let mut bench = add_remove_table::Benchmark::new(); | ||
b.iter(move || bench.run()); | ||
}); | ||
group.bench_function("sparse_set", |b| { | ||
let mut bench = add_remove_sparse_set::Benchmark::new(); | ||
b.iter(move || bench.run()); | ||
}); | ||
group.finish(); | ||
} | ||
|
||
fn add_remove_big(c: &mut Criterion) { | ||
let mut group = c.benchmark_group("add_remove_big"); | ||
group.warm_up_time(std::time::Duration::from_millis(500)); | ||
group.measurement_time(std::time::Duration::from_secs(4)); | ||
group.bench_function("table", |b| { | ||
let mut bench = add_remove_big_table::Benchmark::new(); | ||
b.iter(move || bench.run()); | ||
}); | ||
group.bench_function("sparse_set", |b| { | ||
let mut bench = add_remove_big_sparse_set::Benchmark::new(); | ||
b.iter(move || bench.run()); | ||
}); | ||
group.finish(); | ||
} | ||
|
||
fn insert_simple(c: &mut Criterion) { | ||
let mut group = c.benchmark_group("insert_simple"); | ||
group.warm_up_time(std::time::Duration::from_millis(500)); | ||
group.measurement_time(std::time::Duration::from_secs(4)); | ||
group.bench_function("base", |b| { | ||
let mut bench = insert_simple::Benchmark::new(); | ||
b.iter(move || bench.run()); | ||
}); | ||
group.bench_function("unbatched", |b| { | ||
let mut bench = insert_simple_unbatched::Benchmark::new(); | ||
b.iter(move || bench.run()); | ||
}); | ||
group.finish(); | ||
} |
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
benches/benches/bevy_ecs/ecs_bench_suite/get_component_system.rs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.