Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-db/src/apply_change.rs')
-rw-r--r--crates/ide-db/src/apply_change.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ide-db/src/apply_change.rs b/crates/ide-db/src/apply_change.rs
index b77a18f56e..7a3c466daa 100644
--- a/crates/ide-db/src/apply_change.rs
+++ b/crates/ide-db/src/apply_change.rs
@@ -1,16 +1,21 @@
//! Applies changes to the IDE state transactionally.
+use std::time::{Duration, Instant};
+
use profile::Bytes;
use salsa::Database as _;
use crate::{ChangeWithProcMacros, RootDatabase};
impl RootDatabase {
- pub fn apply_change(&mut self, change: ChangeWithProcMacros) {
+ pub fn apply_change(&mut self, change: ChangeWithProcMacros) -> Duration {
let _p = tracing::info_span!("RootDatabase::apply_change").entered();
+ let now = Instant::now();
self.trigger_cancellation();
+ let elapsed = now.elapsed();
tracing::trace!("apply_change {:?}", change);
change.apply(self);
+ elapsed
}
// Feature: Memory Usage