diff options
author | tcmal <tcmal> | 2023-06-19 12:55:14 +0000 |
---|---|---|
committer | Aria <me@aria.rip> | 2023-10-01 17:31:30 +0100 |
commit | 15c823e14ea728d57bcb79af852d99d294d9dc43 (patch) | |
tree | b7f8949128d81ba408a5f962b2147483a429256d /incria/src/deps.rs | |
parent | 3291ea405b60695a25703e713c7fc47dda602e8d (diff) |
add tracing
Diffstat (limited to 'incria/src/deps.rs')
-rw-r--r-- | incria/src/deps.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/incria/src/deps.rs b/incria/src/deps.rs index 924eb3f..f2fd8f8 100644 --- a/incria/src/deps.rs +++ b/incria/src/deps.rs @@ -18,6 +18,8 @@ use std::{ thread, }; +use tracing::instrument; + /// Identifier of a node, unique across a program run. pub type NodeId = u64; @@ -40,6 +42,7 @@ struct DepTracker { impl DepTracker { /// See [`self::add_dep`] + #[instrument(level = "trace", skip(self))] fn add_dep(&self, dep: NodeId) { self.deps .lock() @@ -65,6 +68,7 @@ impl DepTracker { } /// See [`self::mark_dirty`] + #[instrument(level = "trace", skip(self))] fn mark_dirty(&self, node: NodeId) { let mut lock = self.deps.lock().unwrap(); let mut frontier = VecDeque::new(); @@ -87,6 +91,7 @@ impl DepTracker { } /// See [`self::is_dirty`] + #[instrument(level = "trace", skip(self))] fn is_dirty(&self, node: NodeId) -> bool { self.deps .lock() @@ -97,6 +102,7 @@ impl DepTracker { } /// See [`self::clear`] + #[instrument(level = "trace", skip(self))] fn clear(&self, node: NodeId) { let mut lock = self.deps.lock().unwrap(); let node = match lock.get_mut(&node) { |