Skip to content

Commit

Permalink
commands: log repo requirements
Browse files Browse the repository at this point in the history
Summary:
At the command start, log repo requirements.

We cannot do this in lib/repo since the sampling config wasn't loaded at that time.

Reviewed By: sggutier

Differential Revision: D66840177

fbshipit-source-id: 550bd8c71b3cf7c11e3fbfee7f398730382c6060
  • Loading branch information
quark-zju authored and facebook-github-bot committed Dec 6, 2024
1 parent 74793c0 commit 28181d9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions eden/scm/lib/commands/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,16 @@ fn dispatch_command(
if let Some(repo) = dispatcher.repo() {
tracing::info!(target: "symlink_info",
symlinks_enabled=cfg!(unix) || repo.requirements.contains("windowssymlinks"));
let _ = sampling::log!(
target: "repo_info",
repo_requirements = {
let reqs1 = repo.requirements.to_set();
let reqs2 = repo.store_requirements.to_set();
let mut reqs: Vec<String> = reqs1.into_iter().chain(reqs2.into_iter()).collect();
reqs.sort_unstable();
reqs
}
);
}

let run_logger =
Expand Down

0 comments on commit 28181d9

Please sign in to comment.