mirror of
https://github.com/bevyengine/bevy
synced 2024-12-19 01:23:09 +00:00
refactor: run rustfmt
This commit is contained in:
parent
5d26f56eb9
commit
afc8d33a87
11 changed files with 17 additions and 30 deletions
|
@ -1,11 +1,11 @@
|
|||
use criterion::*;
|
||||
|
||||
mod add_remove;
|
||||
mod add_remove_big_sparse_set;
|
||||
mod add_remove_big_table;
|
||||
mod add_remove_sparse_set;
|
||||
mod add_remove_table;
|
||||
mod add_remove_very_big_table;
|
||||
mod add_remove;
|
||||
mod archetype_updates;
|
||||
mod insert_simple;
|
||||
mod insert_simple_unbatched;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use bevy_ecs::prelude::*;
|
||||
use bevy_ecs::system::SystemState;
|
||||
use core::hint::black_box;
|
||||
use criterion::*;
|
||||
use glam::*;
|
||||
use core::hint::black_box;
|
||||
|
||||
criterion_group!(fragmentation_benches, iter_frag_empty);
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#![expect(dead_code, reason = "Many fields are unused/unread as they are just for benchmarking purposes.")]
|
||||
#![expect(
|
||||
dead_code,
|
||||
reason = "Many fields are unused/unread as they are just for benchmarking purposes."
|
||||
)]
|
||||
|
||||
use criterion::criterion_main;
|
||||
|
||||
|
|
|
@ -2,6 +2,4 @@ use criterion::criterion_main;
|
|||
|
||||
mod bezier;
|
||||
|
||||
criterion_main!(
|
||||
bezier::benches,
|
||||
);
|
||||
criterion_main!(bezier::benches);
|
||||
|
|
|
@ -2,6 +2,4 @@ use criterion::criterion_main;
|
|||
|
||||
mod ray_mesh_intersection;
|
||||
|
||||
criterion_main!(
|
||||
ray_mesh_intersection::benches,
|
||||
);
|
||||
criterion_main!(ray_mesh_intersection::benches);
|
||||
|
|
|
@ -2,8 +2,8 @@ use core::{iter, time::Duration};
|
|||
|
||||
use bevy_reflect::{DynamicList, List};
|
||||
use criterion::{
|
||||
black_box, criterion_group, measurement::Measurement, BatchSize,
|
||||
BenchmarkGroup, BenchmarkId, Criterion, Throughput,
|
||||
black_box, criterion_group, measurement::Measurement, BatchSize, BenchmarkGroup, BenchmarkId,
|
||||
Criterion, Throughput,
|
||||
};
|
||||
|
||||
criterion_group!(
|
||||
|
|
|
@ -3,8 +3,8 @@ use core::{fmt::Write, iter, time::Duration};
|
|||
use bevy_reflect::{DynamicMap, Map};
|
||||
use bevy_utils::HashMap;
|
||||
use criterion::{
|
||||
black_box, criterion_group, measurement::Measurement, BatchSize,
|
||||
BenchmarkGroup, BenchmarkId, Criterion, Throughput,
|
||||
black_box, criterion_group, measurement::Measurement, BatchSize, BenchmarkGroup, BenchmarkId,
|
||||
Criterion, Throughput,
|
||||
};
|
||||
|
||||
criterion_group!(
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
use core::{fmt::Write, str, time::Duration};
|
||||
|
||||
use bevy_reflect::ParsedPath;
|
||||
use criterion::{
|
||||
black_box, criterion_group, BatchSize, BenchmarkId, Criterion, Throughput,
|
||||
};
|
||||
use criterion::{black_box, criterion_group, BatchSize, BenchmarkId, Criterion, Throughput};
|
||||
use rand::{distributions::Uniform, Rng, SeedableRng};
|
||||
use rand_chacha::ChaCha8Rng;
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
use core::time::Duration;
|
||||
|
||||
use bevy_reflect::{DynamicStruct, GetField, PartialReflect, Reflect, Struct};
|
||||
use criterion::{
|
||||
black_box, criterion_group, BatchSize, BenchmarkId, Criterion, Throughput,
|
||||
};
|
||||
use criterion::{black_box, criterion_group, BatchSize, BenchmarkId, Criterion, Throughput};
|
||||
|
||||
criterion_group!(
|
||||
benches,
|
||||
|
|
|
@ -3,7 +3,4 @@ use criterion::criterion_main;
|
|||
mod render_layers;
|
||||
mod torus;
|
||||
|
||||
criterion_main!(
|
||||
render_layers::benches,
|
||||
torus::benches,
|
||||
);
|
||||
criterion_main!(render_layers::benches, torus::benches);
|
||||
|
|
|
@ -6,13 +6,8 @@ fn render_layers(c: &mut Criterion) {
|
|||
c.bench_function("layers_intersect", |b| {
|
||||
let layer_a = RenderLayers::layer(1).with(2);
|
||||
let layer_b = RenderLayers::layer(1);
|
||||
b.iter(|| {
|
||||
black_box(layer_a.intersects(&layer_b))
|
||||
});
|
||||
b.iter(|| black_box(layer_a.intersects(&layer_b)));
|
||||
});
|
||||
}
|
||||
|
||||
criterion_group!(
|
||||
benches,
|
||||
render_layers,
|
||||
);
|
||||
criterion_group!(benches, render_layers);
|
||||
|
|
Loading…
Reference in a new issue