diff --git a/benchmarks/others.py b/benchmarks/others.py index b8cb829cb993f2081983127d01e705b1733847f2_YmVuY2htYXJrcy9vdGhlcnMucHk=..70bb2a3dc1fc8e15d436c8b0ebffec4e7b270907_YmVuY2htYXJrcy9vdGhlcnMucHk= 100644 --- a/benchmarks/others.py +++ b/benchmarks/others.py @@ -60,6 +60,44 @@ def track_perfwalk(self, *args, **kwargs): return self.perfext("perfwalk") +class RevlogReadTestSuite(BaseTestSuite): + params = BaseTestSuite.params[:] + param_names = BaseTestSuite.param_names[:] + + timeout = 1800 + + # add a parameters the distance between each read + param_names += ['distance'] + params += [[1]] + # add a parameters for the number of read to make + param_names += ['nbrev'] + params += [[100]] + + def _run_one(self, target, distance, nbrev, reverse=False): + cmd = [ + "perfrevlogrevisions", + target, + "--dist", "%d" % distance, + "--startrev", "-%d" % (distance * nbrev) + ] + if reverse: + cmd.append("--reverse") + return self.perfext(*cmd) + + @params_as_kwargs + def track_perfrevlogrevisions_manifest_asc(self, distance, nbrev, + *args, **kwargs): + return self._run_one('--manifest', distance, nbrev) + + @params_as_kwargs + def track_perfrevlogrevisions_manifest_desc(self, distance, nbrev, + *args, **kwargs): + return self._run_one('--manifest', distance, nbrev, reverse=True) + + @params_as_kwargs + def track_perfrevlogrevisions_changelog(self, distance, nbrev, + *args, **kwargs): + return self._run_one('--changelog', distance, nbrev) class ManifestPerfTestSuite(BaseTestSuite): params = BaseTestSuite.params + [['persist', 'clear']]