Skip to content

Commit df64e9d

Browse files
yancoutofacebook-github-bot
authored andcommitted
mirror: Log less and make concurrency customisable
Summary: Slices were very noisy, so I made them log less. Plus now you can specify the concurrency of the command via CLI args. I tweaked it and saw no improvements though :( Reviewed By: markbt Differential Revision: D42683915 fbshipit-source-id: 5930a44c6a24fd48560512dd83a630c283c9a351
1 parent 3a73b55 commit df64e9d

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

  • eden/mononoke/commit_traversal/slice_repository/src

eden/mononoke/commit_traversal/slice_repository/src/lib.rs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,19 @@ where
158158
.await?;
159159

160160
let mut slices = Vec::new();
161+
let mut next_log_size = 1;
161162
while let Some((cur_gen, mut heads)) = head_generation_groups.pop_last() {
162-
info!(
163-
ctx.logger(),
164-
"Adding slice starting at generation {} with {} heads ({} slices queued)",
165-
cur_gen,
166-
heads.len(),
167-
head_generation_groups.len()
168-
);
163+
if slices.len() > next_log_size {
164+
info!(
165+
ctx.logger(),
166+
"Adding slice starting at generation {} with {} heads ({} slices queued, {} so far)",
167+
cur_gen,
168+
heads.len(),
169+
head_generation_groups.len(),
170+
slices.len(),
171+
);
172+
next_log_size *= 2;
173+
}
169174
let mut new_heads_groups = HashMap::new();
170175
let mut seen: HashSet<_> = heads.iter().cloned().collect();
171176
while let Some(csid) = heads.pop() {

0 commit comments

Comments
 (0)