Skip to content

Commit 8cdb023

Browse files
committed
scope time repo watcher
1 parent 92f63d1 commit 8cdb023

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/watcher.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use notify::{Error, RecommendedWatcher, RecursiveMode};
44
use notify_debouncer_mini::{
55
new_debouncer, DebouncedEvent, Debouncer,
66
};
7+
use scopetime::scope_time;
78
use std::{
89
path::Path, sync::mpsc::RecvError, thread, time::Duration,
910
};
@@ -16,6 +17,8 @@ pub struct RepoWatcher {
1617

1718
impl RepoWatcher {
1819
pub fn new(workdir: &str) -> Result<Self> {
20+
scope_time!("RepoWatcher::new");
21+
1922
let (tx, rx) = std::sync::mpsc::channel();
2023

2124
let mut debouncer =

0 commit comments

Comments
 (0)