Auto merge of #5314 - matklad:need-more-time, r=alexcrichton
authorbors <bors@rust-lang.org>
Sat, 7 Apr 2018 14:30:47 +0000 (14:30 +0000)
committerbors <bors@rust-lang.org>
Sat, 7 Apr 2018 14:30:47 +0000 (14:30 +0000)
Try to measure all time it takes to compile code

As @killercup noticed on IRC, no-op build by Cargo takes as much as 300 ms (on stable, beta and nightly), which seems unreasonable. However, Cargo wrongly reports ` Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs`, and this might be the reason why we haven't noticed this before.

So let's try to measure time slightly better:

```
~/projects/rustraytracer master*
λ time cargo +stable build
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
cargo +stable build  0.16s user 0.02s system 94% cpu 0.195 total

~/projects/rustraytracer master*
λ time $c build # Cargo with this patch applied
    Finished dev [unoptimized + debuginfo] target(s) in 0.31 secs
$c build  0.30s user 0.02s system 96% cpu 0.330 total
```

r? @alexcrichton


Trivial merge