mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Add Tracy span to Config::load and parse
This commit is contained in:
@@ -14,3 +14,4 @@ knuffel = "3.2.0"
|
||||
miette = "5.10.0"
|
||||
smithay.workspace = true
|
||||
tracing.workspace = true
|
||||
tracy-client.workspace = true
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user