mirror of
https://github.com/YaLTeR/niri.git
synced 2024-09-11 12:35:58 +03:00
Add Tracy span to Config::load and parse
This commit is contained in:
parent
69907f123d
commit
8a7e4bc3cd
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -1737,6 +1737,7 @@ dependencies = [
|
|||||||
"miette",
|
"miette",
|
||||||
"smithay",
|
"smithay",
|
||||||
"tracing",
|
"tracing",
|
||||||
|
"tracy-client",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -10,6 +10,7 @@ repository = "https://github.com/YaLTeR/niri"
|
|||||||
bitflags = "2.4.1"
|
bitflags = "2.4.1"
|
||||||
directories = "5.0.1"
|
directories = "5.0.1"
|
||||||
tracing = { version = "0.1.40", features = ["max_level_trace", "release_max_level_debug"] }
|
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]
|
[workspace.dependencies.smithay]
|
||||||
git = "https://github.com/Smithay/smithay.git"
|
git = "https://github.com/Smithay/smithay.git"
|
||||||
@ -56,7 +57,7 @@ smithay-drm-extras.workspace = true
|
|||||||
serde = { version = "1.0.195", features = ["derive"] }
|
serde = { version = "1.0.195", features = ["derive"] }
|
||||||
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
tracy-client = { version = "0.16.5", default-features = false }
|
tracy-client.workspace = true
|
||||||
url = { version = "2.5.0", optional = true }
|
url = { version = "2.5.0", optional = true }
|
||||||
xcursor = "0.3.5"
|
xcursor = "0.3.5"
|
||||||
zbus = { version = "3.14.1", optional = true }
|
zbus = { version = "3.14.1", optional = true }
|
||||||
|
@ -14,3 +14,4 @@ knuffel = "3.2.0"
|
|||||||
miette = "5.10.0"
|
miette = "5.10.0"
|
||||||
smithay.workspace = true
|
smithay.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
|
tracy-client.workspace = true
|
||||||
|
@ -480,6 +480,7 @@ impl Default for DebugConfig {
|
|||||||
|
|
||||||
impl Config {
|
impl Config {
|
||||||
pub fn load(path: Option<PathBuf>) -> miette::Result<(Self, PathBuf)> {
|
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")
|
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> {
|
pub fn parse(filename: &str, text: &str) -> Result<Self, knuffel::Error> {
|
||||||
|
let _span = tracy_client::span!("Config::parse");
|
||||||
knuffel::parse(filename, text)
|
knuffel::parse(filename, text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user