@@ -25,12 +25,12 @@ async fn setup(endpoint: &str) -> (ReqSocket, RepSocket) {
25
25
fn criterion_benchmark ( c : & mut Criterion ) {
26
26
#[ cfg( feature = "tokio-runtime" ) ]
27
27
type Runtime = tokio:: runtime:: Runtime ;
28
- #[ cfg( feature = "async-std-runtime" ) ]
28
+ #[ cfg( any ( feature = "async-std-runtime" , feature = "async-dispatcher-runtime" ) ) ]
29
29
type Runtime = ( ) ;
30
30
31
31
#[ cfg( feature = "tokio-runtime" ) ]
32
32
let mut rt = tokio:: runtime:: Runtime :: new ( ) . unwrap ( ) ;
33
- #[ cfg( feature = "async-std-runtime" ) ]
33
+ #[ cfg( any ( feature = "async-std-runtime" , feature = "async-dispatcher-runtime" ) ) ]
34
34
let mut rt = ( ) ;
35
35
36
36
const N_MSG : u32 = 512 ;
@@ -48,6 +48,8 @@ fn criterion_benchmark(c: &mut Criterion) {
48
48
let ( req, rep) = rt. block_on ( setup ( endpoint) ) ;
49
49
#[ cfg( feature = "async-std-runtime" ) ]
50
50
let ( req, rep) = async_std:: task:: block_on ( setup ( endpoint) ) ;
51
+ #[ cfg( feature = "async-dispatcher-runtime" ) ]
52
+ let ( req, rep) = async_dispatcher:: block_on ( setup ( endpoint) ) ;
51
53
52
54
let ( mut req, mut rep) = ( Some ( req) , Some ( rep) ) ;
53
55
@@ -57,6 +59,8 @@ fn criterion_benchmark(c: &mut Criterion) {
57
59
rt. block_on ( iter_fn ( & mut req, & mut rep) ) ;
58
60
#[ cfg( feature = "async-std-runtime" ) ]
59
61
async_std:: task:: block_on ( iter_fn ( & mut req, & mut rep) ) ;
62
+ #[ cfg( feature = "async-dispatcher-runtime" ) ]
63
+ async_dispatcher:: block_on ( iter_fn ( & mut req, & mut rep) ) ;
60
64
} )
61
65
} ) ;
62
66
}
0 commit comments