diff --git a/benchmarks/others.py b/benchmarks/others.py index 8db929b94913620b05973b3dd19fd3e905816932_YmVuY2htYXJrcy9vdGhlcnMucHk=..4fafef4c9eae619f8e4bbc92567118ca8d430b13_YmVuY2htYXJrcy9vdGhlcnMucHk= 100644 --- a/benchmarks/others.py +++ b/benchmarks/others.py @@ -377,3 +377,27 @@ cmd.append('--no-clear-revlogs') data = self.perfextjson(*cmd) return data[None]['median'] + +class PerfBranchmapLoadSuite(BaseTestSuite): + params = BaseTestSuite.params + [['cold', 'warm']] + param_names = BaseTestSuite.param_names + ['changelog'] + + timeout = 300 + + @params_as_kwargs + def track_perfbranchmap_load(self, changelog, *args, **kwargs): + if changelog == 'warm': + clearcache = False + elif changelog == 'cold': + clearcache = True + else: + assert False + cmd = ['perfbranchmapload'] + if clearcache: + cmd.append('--clear-revlogs') + else: + cmd.append('--no-clear-revlogs') + data = self.perfextjson(*cmd) + if None not in data: + return float('nan') + return data[None]['median']