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 = [
1737 "miette",1737 "miette",
1738 "smithay",1738 "smithay",
1739 "tracing",1739 "tracing",
1740+ "tracy-client",
1740 ]1741 ]
1741 1742
1742 [[package]]1743 [[package]]
Cargo.tomlmodified+2 -1
@@ -10,6 +10,7 @@ repository = "https://github.com/YaLTeR/niri"
10 bitflags = "2.4.1"10 bitflags = "2.4.1"
11 directories = "5.0.1"11 directories = "5.0.1"
12 tracing = { version = "0.1.40", features = ["max_level_trace", "release_max_level_debug"] }12 tracing = { version = "0.1.40", features = ["max_level_trace", "release_max_level_debug"] }
13+tracy-client = { version = "0.16.5", default-features = false }
13 14
14 [workspace.dependencies.smithay]15 [workspace.dependencies.smithay]
15 git = "https://github.com/Smithay/smithay.git"16 git = "https://github.com/Smithay/smithay.git"
@@ -56,7 +57,7 @@ smithay-drm-extras.workspace = true
56 serde = { version = "1.0.195", features = ["derive"] }57 serde = { version = "1.0.195", features = ["derive"] }
57 tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }58 tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
58 tracing.workspace = true59 tracing.workspace = true
59-tracy-client = { version = "0.16.5", default-features = false }60+tracy-client.workspace = true
60 url = { version = "2.5.0", optional = true }61 url = { version = "2.5.0", optional = true }
61 xcursor = "0.3.5"62 xcursor = "0.3.5"
62 zbus = { version = "3.14.1", optional = true }63 zbus = { version = "3.14.1", optional = true }
niri-config/Cargo.tomlmodified+1 -0
@@ -14,3 +14,4 @@ knuffel = "3.2.0"
14 miette = "5.10.0"14 miette = "5.10.0"
15 smithay.workspace = true15 smithay.workspace = true
16 tracing.workspace = true16 tracing.workspace = true
17+tracy-client.workspace = true
niri-config/src/lib.rsmodified+2 -0
@@ -480,6 +480,7 @@ impl Default for DebugConfig {
480 480
481 impl Config {481 impl Config {
482 pub fn load(path: Option<PathBuf>) -> miette::Result<(Self, PathBuf)> {482 pub fn load(path: Option<PathBuf>) -> miette::Result<(Self, PathBuf)> {
483+ let _span = tracy_client::span!("Config::load");
483 Self::load_internal(path).context("error loading config")484 Self::load_internal(path).context("error loading config")
484 }485 }
485 486
@@ -505,6 +506,7 @@ impl Config {
505 }506 }
506 507
507 pub fn parse(filename: &str, text: &str) -> Result<Self, knuffel::Error> {508 pub fn parse(filename: &str, text: &str) -> Result<Self, knuffel::Error> {
509+ let _span = tracy_client::span!("Config::parse");
508 knuffel::parse(filename, text)510 knuffel::parse(filename, text)
509 }511 }
510 }512 }