feat(tokio): profiling
This commit is contained in:
2
.cargo/config.toml
Normal file
2
.cargo/config.toml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[build]
|
||||||
|
rustflags = ["--cfg", "tokio_unstable"]
|
||||||
@@ -51,9 +51,14 @@ features = ["desktop", "renderer_gl", "wayland_frontend"]
|
|||||||
version = "*"
|
version = "*"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
|
[dependencies.console-subscriber]
|
||||||
|
version = "0.1.8"
|
||||||
|
optional = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["wayland"]
|
default = ["wayland"]
|
||||||
wayland = ["dep:smithay", "dep:xkbcommon"]
|
wayland = ["dep:smithay", "dep:xkbcommon"]
|
||||||
|
profile = ["dep:console-subscriber"]
|
||||||
|
|
||||||
# [patch.crates-io.stereokit]
|
# [patch.crates-io.stereokit]
|
||||||
# path = "../stereokit-rs"
|
# path = "../stereokit-rs"
|
||||||
|
|||||||
@@ -42,7 +42,11 @@ struct CliArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
tracing_subscriber::fmt::init();
|
if !cfg!(feature = "profile") {
|
||||||
|
tracing_subscriber::fmt::init();
|
||||||
|
}
|
||||||
|
#[cfg(feature = "profile")]
|
||||||
|
console_subscriber::init();
|
||||||
let project_dirs = ProjectDirs::from("", "", "stardust").unwrap();
|
let project_dirs = ProjectDirs::from("", "", "stardust").unwrap();
|
||||||
let cli_args = Arc::new(CliArgs::parse());
|
let cli_args = Arc::new(CliArgs::parse());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user