Skip to content

Commit 57f01cd

Browse files
committed
Store bootstrap command-line into metrics
1 parent 3dae534 commit 57f01cd

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/bootstrap/src/utils/metrics.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ impl BuildMetrics {
200200
}
201201
};
202202
invocations.push(JsonInvocation {
203+
cmdline: std::env::args_os()
204+
.skip(1)
205+
.map(|arg| arg.to_string_lossy().to_string())
206+
.collect::<Vec<_>>()
207+
.join(" "),
203208
start_time: state
204209
.invocation_start
205210
.duration_since(SystemTime::UNIX_EPOCH)

src/build_helper/src/metrics.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pub struct JsonRoot {
1212
#[derive(Serialize, Deserialize)]
1313
#[serde(rename_all = "snake_case")]
1414
pub struct JsonInvocation {
15+
// Remembers the command-line invocation with which was bootstrap invoked.
16+
pub cmdline: String,
1517
// Unix timestamp in seconds
1618
//
1719
// This is necessary to easily correlate this invocation with logs or other data.

0 commit comments

Comments
 (0)