diff --git a/benchmarks/basic_commands.py b/benchmarks/basic_commands.py index b1407f61bf1b6d9f165f49899de238a692c3b525_YmVuY2htYXJrcy9iYXNpY19jb21tYW5kcy5weQ==..d2d2c44a228ff4c17446b47832b6dd7e86c4be45_YmVuY2htYXJrcy9iYXNpY19jb21tYW5kcy5weQ== 100644 --- a/benchmarks/basic_commands.py +++ b/benchmarks/basic_commands.py @@ -142,5 +142,7 @@ class BaseExchangeTimeSuite(BaseTimeTestSuite): param_names = BaseTimeTestSuite.param_names + ['strip', 'revset'] params = BaseTimeTestSuite.params + [['same', 'last(all(), 10)', 'last(all(), 100)', 'last(all(), 1000)']] + [[None, 'default']] + timer = timeit.default_timer + sample_time = 10 def setup(self, repo_name, strip, revset): @@ -145,7 +147,5 @@ def setup(self, repo_name, strip, revset): - self.timer = timeit.default_timer - self.sample_time = 10 super(BaseExchangeTimeSuite, self).setup(repo_name) self.clone_path = os.path.join(REPOS_DIR, '.cache', 'partial-{}-{}'.format( repo_name, base64.b64encode(strip))) @@ -181,6 +181,10 @@ class PushPullTimeSuite(BaseExchangeTimeSuite): timeout = 300 + # Force setup to be called between two push or pull + number = 1 + repeat = 20 + warmup_time = 0 def setup(self, repo_name, strip, revset): super(PushPullTimeSuite, self).setup(repo_name, strip, revset) @@ -209,7 +213,7 @@ self.repo_path] if self.rev: cmd.extend(['-r', self.rev]) - self._single_execute(cmd, expected_return_code=1 if strip == "same" else 0) + self._single_execute(cmd) class CloneTimeSuite(BaseExchangeTimeSuite): diff --git a/benchmarks/utils.py b/benchmarks/utils.py index b1407f61bf1b6d9f165f49899de238a692c3b525_YmVuY2htYXJrcy91dGlscy5weQ==..d2d2c44a228ff4c17446b47832b6dd7e86c4be45_YmVuY2htYXJrcy91dGlscy5weQ== 100644 --- a/benchmarks/utils.py +++ b/benchmarks/utils.py @@ -227,6 +227,9 @@ except subprocess.CalledProcessError as exc: if exc.returncode != expected_return_code: raise + else: + if expected_return_code != 0: + raise RuntimeError('unexpected return code 0 for %s' % (cmd,)) class BaseNChangesetsTestSuite(BaseTimeTestSuite):