Store bootstrap command-line into metrics

This commit is contained in:
Jakub Beránek 2025-02-19 16:06:47 +01:00
parent 6463590f0c
commit 2e5ab4e6a0
2 changed files with 10 additions and 0 deletions

View file

@ -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::<Vec<_>>()
.join(" "),
start_time: state
.invocation_start
.duration_since(SystemTime::UNIX_EPOCH)