From 8652bae92542f52eb6ebfc63ac0d02a74fb03e2e Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Sat, 12 Aug 2023 11:46:42 +0900 Subject: [PATCH] index: add tracing output to "jj debug reindex" path --- lib/src/default_index_store.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/src/default_index_store.rs b/lib/src/default_index_store.rs index d0251d4a6..7052dbda2 100644 --- a/lib/src/default_index_store.rs +++ b/lib/src/default_index_store.rs @@ -103,6 +103,7 @@ impl DefaultIndexStore { ) } + #[tracing::instrument(skip(self, store))] fn index_at_operation( &self, store: &Arc, @@ -145,6 +146,11 @@ impl DefaultIndexStore { } } + tracing::info!( + ?maybe_parent_file, + new_heads_count = new_heads.len(), + "indexing commits reachable from historical heads" + ); let mut heads = new_heads.into_iter().collect_vec(); heads.sort(); let commits = topo_order_earlier_first(store, heads, maybe_parent_file); @@ -154,8 +160,12 @@ impl DefaultIndexStore { } let index_file = data.save_in(self.dir.clone())?; - self.associate_file_with_operation(&index_file, operation.id())?; + tracing::info!( + ?index_file, + commits_count = commits.len(), + "saved new index file" + ); Ok(index_file) }