rskit-http 0.2.0-alpha.2

Framework-neutral HTTP abstractions and Tower adapters for rskit transport
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! HTTP router dispatch benchmarks.
use criterion::{Criterion, criterion_group, criterion_main};

fn bench_router_smoke(c: &mut Criterion) {
    c.bench_function("router_build", |b| {
        b.iter(|| {
            axum::Router::<()>::new()
                .route("/healthz", axum::routing::get(|| async { "ok" }))
                .route("/api/v1/users", axum::routing::get(|| async { "[]" }))
        });
    });
}

criterion_group!(benches, bench_router_smoke);
criterion_main!(benches);