rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.65k stars 12.75k forks source link

compiletest: emit time spent for each test suite #59437

Open pnkfelix opened 5 years ago

pnkfelix commented 5 years ago

Right now we have test suites with thousands of files each. It would be useful for compiletest to indicate how long it takes when it runs each such suite, so that someone reviewing where time is going during testing can know where the bulk of time overall is being spent without having to stare at the output holding a stopwatch.

pnkfelix commented 5 years ago

or wait, is that what the "finished in NNN.NNN" (where N is a digit) means?

If those lines represent timings, they should have units. And they should indicate on the line itself what is being timed, because I see output like this:

...
test result: ok. 2950 passed; 0 failed; 9 ignored; 0 measured; 0 filtered out

        finished in 112.679
        finished in 224.578
Check compiletest suite=mir-opt mode=mir-opt (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
...

and I shouldn't have to attempt to parse the backscroll to figure out what those two "finished in ..." lines each individually mean.

pnkfelix commented 5 years ago

(also, I am assuming that while compiletest can be configured to run multiple tests in parallel, it never runs multiple test suites in parallel. If this is false, please do let me know.)