diff rust/hg-core/src/dirstate_tree/status.rs @ 49913:c15b415d1bff

rust: use `logging_timer` instead of `micro_timer` I am the author of `micro_timer`. I built it at the time because I couldn't find a crate that was simple to use and flexible to do function timing with. Turns out I just couldn't find it because crates.io's search isn't all that great, or maybe I didn't look hard enough. `logging_timer` is better in every way: - supports changing the logging level - supports start and end logging - supports intermediary messages - supports inline macros - supports formatting the output - better IDE/tree-sitter integration thanks to a more robust proc macro I also changed all uses to one-liners, so it's easier to copy-paste.
author Rapha?l Gom?s <rgomes@octobus.net>
date Fri, 06 Jan 2023 18:52:04 +0100
parents e0c0545e2e55
children e98fd81bb151
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate_tree/status.rs	Thu Jan 12 16:15:51 2023 +0000
+++ b/rust/hg-core/src/dirstate_tree/status.rs	Fri Jan 06 18:52:04 2023 +0100
@@ -19,7 +19,6 @@
 use crate::PatternFileWarning;
 use crate::StatusError;
 use crate::StatusOptions;
-use micro_timer::timed;
 use once_cell::sync::OnceCell;
 use rayon::prelude::*;
 use sha1::{Digest, Sha1};
@@ -39,7 +38,7 @@
 /// and its use of `itertools::merge_join_by`. When reaching a path that only
 /// exists in one of the two trees, depending on information requested by
 /// `options` we may need to traverse the remaining subtree.
-#[timed]
+#[logging_timer::time("trace")]
 pub fn status<'dirstate>(
     dmap: &'dirstate mut DirstateMap,
     matcher: &(dyn Matcher + Sync),