contrib/perf.py
changeset 40769 95f35c873463
parent 40768 f723014677a5
child 40770 b059388d976c
equal deleted inserted replaced
40768:f723014677a5 40769:95f35c873463
  2323     newrevs.sort()
  2323     newrevs.sort()
  2324 
  2324 
  2325     msg = b'benchmark of branchmap with %d revisions with %d new ones\n'
  2325     msg = b'benchmark of branchmap with %d revisions with %d new ones\n'
  2326     ui.status(msg % (len(allbaserevs), len(newrevs)))
  2326     ui.status(msg % (len(allbaserevs), len(newrevs)))
  2327 
  2327 
  2328     base = branchmap.branchcache()
  2328     if True:
  2329     base.update(repo, allbaserevs)
  2329         base = branchmap.branchcache()
  2330 
  2330         base.update(repo, allbaserevs)
  2331     def setup():
  2331 
  2332         x[0] = base.copy()
  2332         def setup():
  2333 
  2333             x[0] = base.copy()
  2334     def bench():
  2334 
  2335         x[0].update(repo, newrevs)
  2335         def bench():
  2336 
  2336             x[0].update(repo, newrevs)
  2337     timer(bench, setup=setup)
  2337 
  2338     fm.end()
  2338         timer(bench, setup=setup)
       
  2339         fm.end()
  2339 
  2340 
  2340 @command(b'perfbranchmapload', [
  2341 @command(b'perfbranchmapload', [
  2341      (b'f', b'filter', b'', b'Specify repoview filter'),
  2342      (b'f', b'filter', b'', b'Specify repoview filter'),
  2342      (b'', b'list', False, b'List brachmap filter caches'),
  2343      (b'', b'list', False, b'List brachmap filter caches'),
  2343      (b'', b'clear-revlogs', False, b'refresh changelog and manifest'),
  2344      (b'', b'clear-revlogs', False, b'refresh changelog and manifest'),