Add Tracy span to Config::load and parse

This commit is contained in:
Ivan Molodetskikh
2024-01-16 12:53:01 +04:00
parent 69907f123d
commit 8a7e4bc3cd
4 changed files with 6 additions and 1 deletions
+2
View File
@@ -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)
}
}