The use pattern of creating a linelog is usually by calling "replacelines"
multiple times. Add a command to benchmark it.
Details
Details
- Reviewers
durin42 - Group Reviewers
hg-reviewers - Commits
- rHG1601afbb573c: perf: add a command to benchmark linelog edits
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
contrib/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? |
contrib/perf.py | ||
---|---|---|
904–912 | I think random.seed(0) makes it stable? Good point about pre-calculate randints. Will change. |
Comment Actions
I'm confident the random.seed(0) gives us the stability between runs we're concerned about.
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?