D4148: perf: add a command to benchmark linelog edits
quark (Jun Wu)
phabricator at mercurial-scm.org
Tue Aug 7 20:15:14 EDT 2018
quark added inline comments.
INLINE COMMENTS
> indygreg wrote in perf.py:904-912
> I'm a bit concerned about the use of random data in a benchmark. Since every run will be different, the benchmark may not be stable. And if the random source is slow, we could be spending time waiting on entropy.
>
> Do you think it is worthwhile to precompute the arguments to `replacelines()` and have the benchmark simply iterate through a list of arguments and call `replacelines()` repeatedly?
I think `random.seed(0)` makes it stable?
Good point about pre-calculate randints. Will change.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4148
To: quark, #hg-reviewers
Cc: indygreg, mercurial-devel
More information about the Mercurial-devel
mailing list