From 28181d9545d80ad40970c34b42849a25627be731 Mon Sep 17 00:00:00 2001 From: Jun Wu Date: Fri, 6 Dec 2024 09:37:49 -0800 Subject: [PATCH] commands: log repo requirements 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 --- eden/scm/lib/commands/src/run.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eden/scm/lib/commands/src/run.rs b/eden/scm/lib/commands/src/run.rs index 862305199e5a2..75fe4858f3634 100644 --- a/eden/scm/lib/commands/src/run.rs +++ b/eden/scm/lib/commands/src/run.rs @@ -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 = reqs1.into_iter().chain(reqs2.into_iter()).collect(); + reqs.sort_unstable(); + reqs + } + ); } let run_logger =