contrib/perf.py
changeset 42016 b900b392c1cc
parent 42015 dbca2e5563c3
child 42017 87066cf5ec0f
equal deleted inserted replaced
42015:dbca2e5563c3 42016:b900b392c1cc
  1162     timer(d)
  1162     timer(d)
  1163     fm.end()
  1163     fm.end()
  1164 
  1164 
  1165 @command(b'perfparents', formatteropts)
  1165 @command(b'perfparents', formatteropts)
  1166 def perfparents(ui, repo, **opts):
  1166 def perfparents(ui, repo, **opts):
       
  1167     """benchmark the time necessary to fetch one changeset's parents.
       
  1168 
       
  1169     The fetch is done using the `node identifier`, traversing all object layer
       
  1170     from the repository object. The N first revision will be used for this
       
  1171     benchmark. N is controlled by the ``perf.parentscount`` config option
       
  1172     (default: 1000).
       
  1173     """
  1167     opts = _byteskwargs(opts)
  1174     opts = _byteskwargs(opts)
  1168     timer, fm = gettimer(ui, opts)
  1175     timer, fm = gettimer(ui, opts)
  1169     # control the number of commits perfparents iterates over
  1176     # control the number of commits perfparents iterates over
  1170     # experimental config: perf.parentscount
  1177     # experimental config: perf.parentscount
  1171     count = getint(ui, b"perf", b"parentscount", 1000)
  1178     count = getint(ui, b"perf", b"parentscount", 1000)