Skip to content

Commit

Permalink
chore: benches_rt/tokio: set event_interval to 1 (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
kanarus authored Aug 28, 2024
1 parent d7da029 commit 610e34e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
3 changes: 3 additions & 0 deletions benches_rt/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*flamegraph.svg
perf.data
perf.data.old
22 changes: 10 additions & 12 deletions benches_rt/tokio/src/bin/param.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
use ohkami::prelude::*;

#[inline(always)]
async fn echo_id(id: String) -> String {
id//.into()
}

#[tokio::main]
async fn main() {
Ohkami::new((
"/user/:id"
.GET(echo_id),
//.GET(|id: String| async {id}),
)).howl("0.0.0.0:3000").await
fn main() {
tokio::runtime::Builder::new_multi_thread()
.enable_all()
.event_interval(1)
.build()
.expect("Failed building the Runtime")
.block_on(Ohkami::new((
"/user/:id"
.GET(|id: String| async {id}),
)).howl("0.0.0.0:3000"))
}

0 comments on commit 610e34e

Please sign in to comment.