forge
Explore
Log in

Don't you dare go Hollow

Add Tracy span to Config::load and parse

Browse files at this commit

8a7e4bc3cd56053546d330bbc5dc855824980a70Ivan MolodetskikhParent: 69907f1
Cargo.lockmodified+1 -0
@@ -1737,6 +1737,7 @@ dependencies = [
17371737 "miette",
17381738 "smithay",
17391739 "tracing",
1740+ "tracy-client",
17401741 ]
17411742
17421743 [[package]]
Cargo.tomlmodified+2 -1
@@ -10,6 +10,7 @@ repository = "https://github.com/YaLTeR/niri"
1010 bitflags = "2.4.1"
1111 directories = "5.0.1"
1212 tracing = { version = "0.1.40", features = ["max_level_trace", "release_max_level_debug"] }
13+tracy-client = { version = "0.16.5", default-features = false }
1314
1415 [workspace.dependencies.smithay]
1516 git = "https://github.com/Smithay/smithay.git"
@@ -56,7 +57,7 @@ smithay-drm-extras.workspace = true
5657 serde = { version = "1.0.195", features = ["derive"] }
5758 tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
5859 tracing.workspace = true
59-tracy-client = { version = "0.16.5", default-features = false }
60+tracy-client.workspace = true
6061 url = { version = "2.5.0", optional = true }
6162 xcursor = "0.3.5"
6263 zbus = { version = "3.14.1", optional = true }
niri-config/Cargo.tomlmodified+1 -0
@@ -14,3 +14,4 @@ knuffel = "3.2.0"
1414 miette = "5.10.0"
1515 smithay.workspace = true
1616 tracing.workspace = true
17+tracy-client.workspace = true
niri-config/src/lib.rsmodified+2 -0
@@ -480,6 +480,7 @@ impl Default for DebugConfig {
480480
481481 impl Config {
482482 pub fn load(path: Option<PathBuf>) -> miette::Result<(Self, PathBuf)> {
483+ let _span = tracy_client::span!("Config::load");
483484 Self::load_internal(path).context("error loading config")
484485 }
485486
@@ -505,6 +506,7 @@ impl Config {
505506 }
506507
507508 pub fn parse(filename: &str, text: &str) -> Result<Self, knuffel::Error> {
509+ let _span = tracy_client::span!("Config::parse");
508510 knuffel::parse(filename, text)
509511 }
510512 }