Sat, 28 Mar 2015 00:47:58 -0700 run-tests: collect aggregate code coverage
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 00:47:58 -0700] rev 24505
run-tests: collect aggregate code coverage Before this patch, every Python process during a code coverage run was writing coverage data to the same file. I'm not sure if the coverage package even tries to obtain a lock on the file. But what I do know is there was some last write wins leading to loss of code coverage data, at least with -j > 1. This patch changes the code coverage mechanism to be multiple process safe. The mechanism for initializing code coverage via sitecustomize.py has been tweaked so each Python process will produce a separate coverage data file on disk. Unless two processes generate the same random value, there are no race conditions writing to the same file. At the end of the test run, we combine all written files into an aggregate report. On my machine, running the full test suite produces a little over 20,000 coverage files consuming ~350 MB. As you can imagine, it takes several seconds to load and merge these coverage files. But when it is done, you have an accurate picture of the aggregate code coverage for the entire test suite, which is ~60% line coverage.
Fri, 27 Mar 2015 23:17:19 -0700 run-tests: obtain code coverage via Python API
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 27 Mar 2015 23:17:19 -0700] rev 24504
run-tests: obtain code coverage via Python API Before, we were invoking the "coverage" program provided by the "coverage" module. This patch changes the code to go through the Python API. This makes the next patch a little bit easier to reason about. A side effect of this patch is that writing code coverage reports will be slightly faster, as we won't have to redundantly load coverage data.
Sat, 28 Mar 2015 12:58:44 -0700 commands.debugrevlog: report max chain length
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 12:58:44 -0700] rev 24503
commands.debugrevlog: report max chain length This is sometimes useful to know. Report it.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -3 +3 +10 +30 +100 +300 +1000 +3000 +10000 tip