Skip to content

Commit

Permalink
mirror: Log less and make concurrency customisable
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yancouto authored and facebook-github-bot committed Jan 24, 2023
1 parent 3a73b55 commit df64e9d
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions eden/mononoke/commit_traversal/slice_repository/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,19 @@ where
.await?;

let mut slices = Vec::new();
let mut next_log_size = 1;
while let Some((cur_gen, mut heads)) = head_generation_groups.pop_last() {
info!(
ctx.logger(),
"Adding slice starting at generation {} with {} heads ({} slices queued)",
cur_gen,
heads.len(),
head_generation_groups.len()
);
if slices.len() > next_log_size {
info!(
ctx.logger(),
"Adding slice starting at generation {} with {} heads ({} slices queued, {} so far)",
cur_gen,
heads.len(),
head_generation_groups.len(),
slices.len(),
);
next_log_size *= 2;
}
let mut new_heads_groups = HashMap::new();
let mut seen: HashSet<_> = heads.iter().cloned().collect();
while let Some(csid) = heads.pop() {
Expand Down

0 comments on commit df64e9d

Please sign in to comment.