aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-01-16 12:53:01 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-01-16 12:53:40 +0400
commit8a7e4bc3cd56053546d330bbc5dc855824980a70 (patch)
treed76a5216b86d7539b27f4c2bc20ecf7bd484d845
parent69907f123d2f17bc1f9a04c0bda7430f250404de (diff)
downloadniri-8a7e4bc3cd56053546d330bbc5dc855824980a70.tar.gz
niri-8a7e4bc3cd56053546d330bbc5dc855824980a70.tar.bz2
niri-8a7e4bc3cd56053546d330bbc5dc855824980a70.zip
Add Tracy span to Config::load and parse
-rw-r--r--Cargo.lock1
-rw-r--r--Cargo.toml3
-rw-r--r--niri-config/Cargo.toml1
-rw-r--r--niri-config/src/lib.rs2
4 files changed, 6 insertions, 1 deletions
diff --git a/Cargo.lock b/Cargo.lock
index b02334b5..2290c2d1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1737,6 +1737,7 @@ dependencies = [
"miette",
"smithay",
"tracing",
+ "tracy-client",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index a78686a5..9b96bdf6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,6 +10,7 @@ repository = "https://github.com/YaLTeR/niri"
bitflags = "2.4.1"
directories = "5.0.1"
tracing = { version = "0.1.40", features = ["max_level_trace", "release_max_level_debug"] }
+tracy-client = { version = "0.16.5", default-features = false }
[workspace.dependencies.smithay]
git = "https://github.com/Smithay/smithay.git"
@@ -56,7 +57,7 @@ smithay-drm-extras.workspace = true
serde = { version = "1.0.195", features = ["derive"] }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
tracing.workspace = true
-tracy-client = { version = "0.16.5", default-features = false }
+tracy-client.workspace = true
url = { version = "2.5.0", optional = true }
xcursor = "0.3.5"
zbus = { version = "3.14.1", optional = true }
diff --git a/niri-config/Cargo.toml b/niri-config/Cargo.toml
index a9b69e80..1d6acab9 100644
--- a/niri-config/Cargo.toml
+++ b/niri-config/Cargo.toml
@@ -14,3 +14,4 @@ knuffel = "3.2.0"
miette = "5.10.0"
smithay.workspace = true
tracing.workspace = true
+tracy-client.workspace = true
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs
index 6cb0675b..b9742df8 100644
--- a/niri-config/src/lib.rs
+++ b/niri-config/src/lib.rs
@@ -480,6 +480,7 @@ impl Default for DebugConfig {
impl Config {
pub fn load(path: Option<PathBuf>) -> miette::Result<(Self, PathBuf)> {
+ let _span = tracy_client::span!("Config::load");
Self::load_internal(path).context("error loading config")
}
@@ -505,6 +506,7 @@ impl Config {
}
pub fn parse(filename: &str, text: &str) -> Result<Self, knuffel::Error> {
+ let _span = tracy_client::span!("Config::parse");
knuffel::parse(filename, text)
}
}