-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* @2024-08-23 02:45+9:00 * next: update docs * Add benches_glommio * refactor around feature flags * not DEBUG * fix to pass CI
- Loading branch information
Showing
28 changed files
with
314 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "ohkami_benches-with-glommio" | ||
version = "0.0.0" | ||
edition = "2021" | ||
authors = ["kanarus <[email protected]>"] | ||
|
||
[dependencies] | ||
# set `default-features = false` to assure "DEBUG" feature be off even when DEBUGing `../ohkami` | ||
ohkami = { path = "../ohkami", default-features = false, features = ["rt_glommio"] } | ||
glommio = { version = "0.9" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use ohkami::prelude::*; | ||
use ohkami::utils::num_cpus; | ||
use glommio::{LocalExecutorPoolBuilder, PoolPlacement, CpuSet}; | ||
|
||
|
||
#[inline(always)] | ||
async fn echo_id(id: String) -> String { | ||
id | ||
} | ||
|
||
fn main() { | ||
LocalExecutorPoolBuilder::new(PoolPlacement::MaxSpread( | ||
dbg!(num_cpus::get()), dbg!(CpuSet::online().ok()) | ||
)).on_all_shards(|| { | ||
Ohkami::new(( | ||
"/user/:id" | ||
.GET(echo_id), | ||
)).howl("0.0.0.0:3000") | ||
}).unwrap().join_all(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.