mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Enhance logging for VFS directory watching
- Added timing measurement for the selective watching process in the `ServeSession` implementation, improving visibility into performance during directory watching. - Updated the debug log message to include the elapsed time for better monitoring of the watching behavior. These changes aim to provide more detailed insights into the VFS's directory watching performance.
This commit is contained in:
parent
a1825f7c4a
commit
a1b65dbb52
1 changed files with 3 additions and 1 deletions
|
|
@ -309,6 +309,7 @@ impl ServeSession {
|
|||
apply_patch_set(&mut tree, patch_set);
|
||||
log::debug!("Patch computed + applied in {:.1?}", patch_start.elapsed());
|
||||
|
||||
let watch_start = Instant::now();
|
||||
if let Some(recorded_paths) = vfs.take_recorded_paths() {
|
||||
let dir_count = recorded_paths.iter().filter(|p| p.is_dir()).count();
|
||||
for path in &recorded_paths {
|
||||
|
|
@ -326,8 +327,9 @@ impl ServeSession {
|
|||
let _ = vfs.watch(root);
|
||||
}
|
||||
log::debug!(
|
||||
"Selective watching: {} directories watched (non-recursive)",
|
||||
"Selective watching: {} directories watched (non-recursive) in {:.1?}",
|
||||
dir_count + path_roots.len(),
|
||||
watch_start.elapsed(),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue