diff --git a/benchmarks/basic_commands.py b/benchmarks/basic_commands.py index e366a7c308788c47c9a233521361aee2de47ff78_YmVuY2htYXJrcy9iYXNpY19jb21tYW5kcy5weQ==..949ed8e30ee653dd19fb0f192b576f8ff5c3075a_YmVuY2htYXJrcy9iYXNpY19jb21tYW5kcy5weQ== 100644 --- a/benchmarks/basic_commands.py +++ b/benchmarks/basic_commands.py @@ -368,9 +368,9 @@ expected_return_code=0) -class PushPullTimeSuite(BaseExchangeTimeSuite): +class BasePushPullTimeSuite(BaseExchangeTimeSuite): # Force setup to be called between two push or pull warmup_time = 0 def setup(self, *args, **kwargs): @@ -372,9 +372,9 @@ # Force setup to be called between two push or pull warmup_time = 0 def setup(self, *args, **kwargs): - super(PushPullTimeSuite, self).setup(*args, **kwargs) + super(BasePushPullTimeSuite, self).setup(*args, **kwargs) tmpdir = os.path.join(REPOS_DIR, '.tmp') try: os.makedirs(tmpdir) @@ -391,6 +391,6 @@ # impact performances metrics self.check_output('sync') - def time_push(self, *args, **kwargs): + def _time_push(self, *args, **kwargs): self.run(self.repo_path, ['push', '-f'], self.tmp_clone_path) @@ -395,6 +395,6 @@ self.run(self.repo_path, ['push', '-f'], self.tmp_clone_path) - def time_pull(self, *args, **kwargs): + def _time_pull(self, *args, **kwargs): self.run(self.tmp_clone_path, 'pull', self.repo_path, expected_return_code=0) @@ -398,6 +398,46 @@ self.run(self.tmp_clone_path, 'pull', self.repo_path, expected_return_code=0) +class NoOpPushPullTimeSuite(BasePushPullTimeSuite): + + params = BaseTestSuite.params + [ + ['local', 'ssh', 'http'], + ["same"], # Force the strip variant to same + [None, 'tip']] + + def time_push(self, *args, **kwargs): + self._time_push() + + def time_pull(self, *args, **kwargs): + self._time_pull() + + +class SmallPushPullTimeSuite(BasePushPullTimeSuite): + + params = BaseTestSuite.params + [ + ['local', 'ssh', 'http'], + ["last-ten", "last-hundred"], # Only the usual strip sizes + [None, 'tip']] + + def time_push(self, *args, **kwargs): + self._time_push() + + def time_pull(self, *args, **kwargs): + self._time_pull() + +class BigPushPullTimeSuite(BasePushPullTimeSuite): + + params = BaseTestSuite.params + [ + ['local', 'ssh', 'http'], + ["last-thousand"], # All the big strip variants + [None, 'tip']] + + def time_push(self, *args, **kwargs): + self._time_push() + + def time_pull(self, *args, **kwargs): + self._time_pull() + # class CloneTimeSuite(BaseExchangeMixin, BaseTestSuite): # param_names = BaseTestSuite.param_names + ['repo_type', 'revset']