Skip to content

Commit 095f154

Browse files
committed
Give build scripts a different color.
1 parent 911a9b0 commit 095f154

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/cargo/core/compiler/timings.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,16 @@ impl<'a, 'cfg> Timings<'a, 'cfg> {
390390
let width = (PX_PER_SEC * unit.duration).max(1.0);
391391

392392
let dep_class = format!("dep-{}", i);
393+
let class = if unit.unit.mode.is_run_custom_build() {
394+
"unit-block-custom"
395+
} else {
396+
"unit-block"
397+
};
393398
writeln!(
394399
f,
395400
" <rect x=\"{:.1}\" y=\"{}\" width=\"{:.1}\" height=\"{}\" \
396-
rx=\"3\" class=\"unit-block\" data-dep-class=\"{}\" />",
397-
x, y, width, BOX_HEIGHT, dep_class,
401+
rx=\"3\" class=\"{}\" data-dep-class=\"{}\" />",
402+
x, y, width, BOX_HEIGHT, class, dep_class,
398403
)?;
399404
let draw_dep_lines = |f: &mut File, x, units| -> CargoResult<()> {
400405
for unlocked in units {
@@ -743,6 +748,10 @@ h1 {
743748
fill: #95cce8;
744749
}
745750
751+
.unit-block-custom {
752+
fill: #f0b165;
753+
}
754+
746755
.unit-block-codegen {
747756
fill: #aa95e8;
748757
pointer-events: none;

0 commit comments

Comments
 (0)