Commit 1e741ee
authored
refactor(timings): reuse timing metric collection logic between
Close #16474.
## What this PR addresses
As described in the issue above, `cargo build --timings` and `cargo
report timings` each had its own metric collection logic. Because `cargo
report timings` will supersede `cargo build --timings`, this PR try to
remove redundant logics from `core/compiler/timings/mod.rs`.
## Review points
- I'm not sure if it's appropriate to modify logger for refactoring.
However, logs emitted inside `core/compiler/timings/mod.rs` alone is not
enough for `prepare_context_from_iter()` to properly replay the build so
I think this is an appropriate way.--timings and -Zbuild-analysis (#16497)File tree
9 files changed
+183
-356
lines changed- src/cargo
- core/compiler
- job_queue
- timings
- ops
- cargo_compile
- cargo_report
- util
9 files changed
+183
-356
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
| 394 | + | |
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| |||
974 | 974 | | |
975 | 975 | | |
976 | 976 | | |
977 | | - | |
978 | 977 | | |
979 | 978 | | |
980 | 979 | | |
981 | 980 | | |
982 | 981 | | |
983 | | - | |
984 | 982 | | |
985 | 983 | | |
986 | 984 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1173 | 1173 | | |
1174 | 1174 | | |
1175 | 1175 | | |
1176 | | - | |
1177 | | - | |
| 1176 | + | |
| 1177 | + | |
1178 | 1178 | | |
1179 | 1179 | | |
1180 | 1180 | | |
| |||
0 commit comments