mirror of
https://github.com/static-web-server/static-web-server.git
synced 2026-01-25 05:06:33 +00:00
* fix: update dependencies 23-10-2025 * chore: update dependencies 26-10-2025 * chore: update dependencies 26.10.2025 & bump up MSRV to 1.85.0 * fix: lint errors * fix: style edition 2024 SWS now requires Rust 1.85.0 (Rust 2024 Edition) or later https://blog.rust-lang.org/2025/02/20/Rust-1.85.0/
17 lines
458 B
Rust
17 lines
458 B
Rust
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
|
|
|
|
use hyper::Method;
|
|
use static_web_server::http_ext::MethodExt;
|
|
|
|
fn is_allowed_benchmark(c: &mut Criterion) {
|
|
let method = Method::default();
|
|
c.bench_with_input(
|
|
BenchmarkId::new("method_input", &method),
|
|
&method,
|
|
|b, _| b.iter(|| method.is_allowed()),
|
|
);
|
|
}
|
|
|
|
criterion_group!(http_ext_bench, is_allowed_benchmark);
|
|
criterion_main!(http_ext_bench);
|