refactor: make all criterion_group!s named benches

Now the distinguishing factor will be their module path, removing the need to rename the group itself if it switches modules.
This commit is contained in:
BD103 2024-12-09 14:39:16 -05:00
parent ee94d48f50
commit cbe1688dcd
11 changed files with 23 additions and 21 deletions

View file

@ -10,7 +10,7 @@ use rand::{prelude::SliceRandom, SeedableRng};
use rand_chacha::ChaCha8Rng;
criterion_group!(
change_detection_benches,
benches,
all_added_detection,
all_changed_detection,
few_changed_detection,
@ -297,7 +297,9 @@ fn add_archetypes_entities<T: Component<Mutability = Mutable> + Default>(
}
}
}
fn multiple_archetype_none_changed_detection_generic<T: Component<Mutability = Mutable> + Default + BenchModify>(
fn multiple_archetype_none_changed_detection_generic<
T: Component<Mutability = Mutable> + Default + BenchModify,
>(
group: &mut BenchGroup,
archetype_count: u16,
entity_count: u32,

View file

@ -13,7 +13,7 @@ mod insert_simple_unbatched;
use archetype_updates::*;
criterion_group!(
components_benches,
benches,
add_remove,
add_remove_big,
add_remove_very_big,

View file

@ -1,7 +1,7 @@
use bevy_ecs::{component::Component, prelude::*, world::World};
use criterion::{black_box, criterion_group, BenchmarkId, Criterion};
criterion_group!(empty_archetypes_benches, empty_archetypes);
criterion_group!(benches, empty_archetypes);
#[derive(Component)]
struct A<const N: u16>(f32);

View file

@ -3,7 +3,7 @@ use criterion::*;
mod iter;
mod send;
criterion_group!(event_benches, send, iter);
criterion_group!(benches, send, iter);
fn send(c: &mut Criterion) {
let mut group = c.benchmark_group("events_send");

View file

@ -4,7 +4,7 @@ use core::hint::black_box;
use criterion::*;
use glam::*;
criterion_group!(fragmentation_benches, iter_frag_empty);
criterion_group!(benches, iter_frag_empty);
#[derive(Component, Default)]
struct Table<const X: usize = 0>(usize);

View file

@ -25,7 +25,7 @@ mod par_iter_simple_foreach_hybrid;
use heavy_compute::*;
criterion_group!(
iterations_benches,
benches,
iter_frag,
iter_frag_sparse,
iter_simple,

View file

@ -18,14 +18,14 @@ mod scheduling;
mod world;
criterion_main!(
change_detection::change_detection_benches,
components::components_benches,
empty_archetypes::empty_archetypes_benches,
events::event_benches,
iteration::iterations_benches,
fragmentation::fragmentation_benches,
observers::observer_benches,
scheduling::scheduling_benches,
world::world_benches,
param::param_benches,
change_detection::benches,
components::benches,
empty_archetypes::benches,
events::benches,
iteration::benches,
fragmentation::benches,
observers::benches,
scheduling::benches,
world::benches,
param::benches,
);

View file

@ -5,4 +5,4 @@ mod simple;
use propagation::*;
use simple::*;
criterion_group!(observer_benches, event_propagation, observe_simple);
criterion_group!(benches, event_propagation, observe_simple);

View file

@ -8,4 +8,4 @@ use combinator_system::*;
use dyn_param::*;
use param_set::*;
criterion_group!(param_benches, combinator_system, dyn_param, param_set);
criterion_group!(benches, combinator_system, dyn_param, param_set);

View file

@ -9,7 +9,7 @@ use running_systems::*;
use schedule::*;
criterion_group!(
scheduling_benches,
benches,
run_condition_yes,
run_condition_no,
run_condition_yes_with_query,

View file

@ -19,7 +19,7 @@ mod entity_hash;
use entity_hash::*;
criterion_group!(
world_benches,
benches,
empty_commands,
spawn_commands,
insert_commands,