Skip to content

Commit b42bec2

Browse files
committed
fix(log): rename timing-info to unit-finished
This is a preparation for adding unit-started event.
1 parent 6562d03 commit b42bec2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/cargo/core/compiler/timings/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ impl<'gctx> Timings<'gctx> {
275275
crate::drop_println!(self.gctx, "{}", msg);
276276
}
277277
if let Some(logger) = build_runner.bcx.logger {
278-
logger.log(LogMessage::TimingInfo {
278+
logger.log(LogMessage::UnitFinished {
279279
package_id: unit_time.unit.pkg.package_id().to_spec(),
280280
target: unit_time.unit.target.clone(),
281281
mode: unit_time.unit.mode,

src/cargo/util/log_message.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub enum LogMessage {
3030
workspace_root: PathBuf,
3131
},
3232
/// Emitted when a compilation unit finishes.
33-
TimingInfo {
33+
UnitFinished {
3434
package_id: PackageIdSpec,
3535
target: Target,
3636
mode: CompileMode,

tests/testsuite/build_analysis.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ fn log_msg_timing_info() {
134134
"duration": "{...}",
135135
"mode": "check",
136136
"package_id": "path+[ROOTURL]/foo/bar#0.0.0",
137-
"reason": "timing-info",
137+
"reason": "unit-finished",
138138
"rmeta_time": "{...}",
139139
"run_id": "[..]T[..]Z-[..]",
140140
"target": "{...}",
@@ -144,7 +144,7 @@ fn log_msg_timing_info() {
144144
"duration": "{...}",
145145
"mode": "check",
146146
"package_id": "path+[ROOTURL]/foo#0.0.0",
147-
"reason": "timing-info",
147+
"reason": "unit-finished",
148148
"rmeta_time": "{...}",
149149
"run_id": "[..]T[..]Z-[..]",
150150
"target": "{...}",
@@ -186,7 +186,7 @@ fn log_rebuild_reason_fresh_build() {
186186
},
187187
{
188188
"...": "{...}",
189-
"reason": "timing-info"
189+
"reason": "unit-finished"
190190
}
191191
]
192192
"#]]
@@ -246,7 +246,7 @@ fn log_rebuild_reason_file_changed() {
246246
},
247247
{
248248
"...": "{...}",
249-
"reason": "timing-info"
249+
"reason": "unit-finished"
250250
}
251251
]
252252
"#]]

0 commit comments

Comments
 (0)