Skip to content
Snippets Groups Projects
Commit 984badc7eb52 authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

Add a benchmark for hg archive -t {files,tar} -r default

Results for "asv dev --bench time_archive":

====================== ======= =======
--                          param2
---------------------- ---------------
         repo           files    tar
====================== ======= =======
      pypy-2017         8.17s   7.96s
    netbeans-2017       2.46m   2.44m
 mozilla-central-2017   2.53m   2.40m
    mercurial-2017      2.06s   2.13s
====================== ======= =======
parent 2cd33e8f03af
No related branches found
No related tags found
No related merge requests found
......@@ -106,6 +106,21 @@
return self._execute('files', '-r', 'default')
class ArchiveTimeTestSuite(BaseTimeTestSuite):
timer = timeit.default_timer
sample_time = 10
timeout = 300
param_names = TimeTestSuite.param_names
params = TimeTestSuite.params + [['files', 'tar']]
def time_archive(self, repo, archive_type, *args, **kwargs):
# asv share the same temporary directory for all combinations
# so use an unique output name
output = os.path.join(os.getcwd(), '{}_archive_{}_{}'.format(
repo, archive_type, time.time()))
return self._execute('archive', '-t', archive_type, '-r', 'default', output)
class LogTimeTestSuite(BaseNChangesetsTestSuite):
timer = timeit.default_timer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment