@@ -11,7 +11,6 @@ use iced_wgpu::wgpu;
1111criterion_main ! ( benches) ;
1212criterion_group ! ( benches, wgpu_benchmark) ;
1313
14- #[ allow( unused_results) ]
1514pub fn wgpu_benchmark ( c : & mut Criterion ) {
1615 use iced_futures:: futures:: executor;
1716 use iced_wgpu:: wgpu;
@@ -38,35 +37,33 @@ pub fn wgpu_benchmark(c: &mut Criterion) {
3837 } ) )
3938 . expect ( "request device" ) ;
4039
41- c. bench_function ( "wgpu — canvas (light)" , |b| {
42- benchmark ( b, & adapter, & device, & queue, |_| scene ( 10 ) ) ;
43- } ) ;
44- c. bench_function ( "wgpu — canvas (heavy)" , |b| {
45- benchmark ( b, & adapter, & device, & queue, |_| scene ( 1_000 ) ) ;
46- } ) ;
47-
48- c. bench_function ( "wgpu - layered text (light)" , |b| {
49- benchmark ( b, & adapter, & device, & queue, |_| layered_text ( 10 ) ) ;
50- } ) ;
51- c. bench_function ( "wgpu - layered text (heavy)" , |b| {
52- benchmark ( b, & adapter, & device, & queue, |_| layered_text ( 1_000 ) ) ;
53- } ) ;
54-
55- c. bench_function ( "wgpu - dynamic text (light)" , |b| {
56- benchmark ( b, & adapter, & device, & queue, |i| dynamic_text ( 1_000 , i) ) ;
57- } ) ;
58- c. bench_function ( "wgpu - dynamic text (heavy)" , |b| {
59- benchmark ( b, & adapter, & device, & queue, |i| dynamic_text ( 100_000 , i) ) ;
60- } ) ;
61-
62- c. bench_function ( "wgpu - advanced shaping (light)" , |b| {
63- benchmark ( b, & adapter, & device, & queue, |i| advanced_shaping ( 1_000 , i) ) ;
64- } ) ;
65- c. bench_function ( "wgpu - advanced shaping (heavy)" , |b| {
66- benchmark ( b, & adapter, & device, & queue, |i| {
67- advanced_shaping ( 100_000 , i)
40+ let _ = c
41+ . bench_function ( "wgpu — canvas (light)" , |b| {
42+ benchmark ( b, & adapter, & device, & queue, |_| scene ( 10 ) ) ;
43+ } )
44+ . bench_function ( "wgpu — canvas (heavy)" , |b| {
45+ benchmark ( b, & adapter, & device, & queue, |_| scene ( 1_000 ) ) ;
46+ } )
47+ . bench_function ( "wgpu - layered text (light)" , |b| {
48+ benchmark ( b, & adapter, & device, & queue, |_| layered_text ( 10 ) ) ;
49+ } )
50+ . bench_function ( "wgpu - layered text (heavy)" , |b| {
51+ benchmark ( b, & adapter, & device, & queue, |_| layered_text ( 1_000 ) ) ;
52+ } )
53+ . bench_function ( "wgpu - dynamic text (light)" , |b| {
54+ benchmark ( b, & adapter, & device, & queue, |i| dynamic_text ( 1_000 , i) ) ;
55+ } )
56+ . bench_function ( "wgpu - dynamic text (heavy)" , |b| {
57+ benchmark ( b, & adapter, & device, & queue, |i| dynamic_text ( 100_000 , i) ) ;
58+ } )
59+ . bench_function ( "wgpu - advanced shaping (light)" , |b| {
60+ benchmark ( b, & adapter, & device, & queue, |i| advanced_shaping ( 1_000 , i) ) ;
61+ } )
62+ . bench_function ( "wgpu - advanced shaping (heavy)" , |b| {
63+ benchmark ( b, & adapter, & device, & queue, |i| {
64+ advanced_shaping ( 100_000 , i)
65+ } ) ;
6866 } ) ;
69- } ) ;
7067}
7168
7269fn benchmark < ' a > (
0 commit comments