From 2e5ab4e6a07a9ebdb6e593ca19112148250e6906 Mon Sep 17 00:00:00 2001 From: Jakub Beránek Date: Wed, 19 Feb 2025 16:06:47 +0100 Subject: Store bootstrap command-line into metrics --- src/bootstrap/src/utils/metrics.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/bootstrap') diff --git a/src/bootstrap/src/utils/metrics.rs b/src/bootstrap/src/utils/metrics.rs index b51fd490535..57766fd63fb 100644 --- a/src/bootstrap/src/utils/metrics.rs +++ b/src/bootstrap/src/utils/metrics.rs @@ -200,6 +200,14 @@ impl BuildMetrics { } }; invocations.push(JsonInvocation { + // The command-line invocation with which bootstrap was invoked. + // Skip the first argument, as it is a potentially long absolute + // path that is not interesting. + cmdline: std::env::args_os() + .skip(1) + .map(|arg| arg.to_string_lossy().to_string()) + .collect::>() + .join(" "), start_time: state .invocation_start .duration_since(SystemTime::UNIX_EPOCH) -- cgit 1.4.1-3-g733a5