ohkami-rs / ohkami

Ohkami - intuitive and declarative web framework for Rust
MIT License
73 stars 6 forks source link

chore: benches_rt/tokio: set `event_interval` to 1 #257

Closed kanarus closed 2 months ago

kanarus commented 2 months ago

I found that in very simple senario, like getting a path param and echoing it as text, the higher setting event_interval of tokio runtime, the lower the performance be. So this PR tries setting it to the minimum value, 1, in benches_rt/tokio/src/bin/param ( default: 61 ).

ref: https://docs.rs/tokio/1.39.3/tokio/runtime/struct.Builder.html#method.event_interval

benchmark examples

wrk -H 'Connection: keep-alive' --connections 32 --threads 16 --duration 3s --timeout 1s 'http://localhost:3000/user/1234567890987654321'