The version flag conflicts with the global version flag and does not work.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
hg-reviewers |
The version flag conflicts with the global version flag and does not work.
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | contrib/perf.py (6 lines) | |||
M | tests/test-contrib-perf.t (6 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Pulkit Goyal | Nov 22 2018, 10:14 AM |
raise error.Abort(b'unhandled bundle type: %s' % type(bundle)) | raise error.Abort(b'unhandled bundle type: %s' % type(bundle)) | ||||
for fn, title in benches: | for fn, title in benches: | ||||
timer, fm = gettimer(ui, opts) | timer, fm = gettimer(ui, opts) | ||||
timer(fn, title=title) | timer(fn, title=title) | ||||
fm.end() | fm.end() | ||||
@command(b'perfchangegroupchangelog', formatteropts + | @command(b'perfchangegroupchangelog', formatteropts + | ||||
[(b'', b'version', b'02', b'changegroup version'), | [(b'', b'cgversion', b'02', b'changegroup version'), | ||||
(b'r', b'rev', b'', b'revisions to add to changegroup')]) | (b'r', b'rev', b'', b'revisions to add to changegroup')]) | ||||
def perfchangegroupchangelog(ui, repo, version=b'02', rev=None, **opts): | def perfchangegroupchangelog(ui, repo, cgversion=b'02', rev=None, **opts): | ||||
"""Benchmark producing a changelog group for a changegroup. | """Benchmark producing a changelog group for a changegroup. | ||||
This measures the time spent processing the changelog during a | This measures the time spent processing the changelog during a | ||||
bundle operation. This occurs during `hg bundle` and on a server | bundle operation. This occurs during `hg bundle` and on a server | ||||
processing a `getbundle` wire protocol request (handles clones | processing a `getbundle` wire protocol request (handles clones | ||||
and pull requests). | and pull requests). | ||||
By default, all revisions are added to the changegroup. | By default, all revisions are added to the changegroup. | ||||
""" | """ | ||||
opts = _byteskwargs(opts) | opts = _byteskwargs(opts) | ||||
cl = repo.changelog | cl = repo.changelog | ||||
nodes = [cl.lookup(r) for r in repo.revs(rev or b'all()')] | nodes = [cl.lookup(r) for r in repo.revs(rev or b'all()')] | ||||
bundler = changegroup.getbundler(version, repo) | bundler = changegroup.getbundler(cgversion, repo) | ||||
def d(): | def d(): | ||||
state, chunks = bundler._generatechangelog(cl, nodes) | state, chunks = bundler._generatechangelog(cl, nodes) | ||||
for chunk in chunks: | for chunk in chunks: | ||||
pass | pass | ||||
timer, fm = gettimer(ui, opts) | timer, fm = gettimer(ui, opts) | ||||
$ hg perfbdiff --alldata 1 | $ hg perfbdiff --alldata 1 | ||||
$ hg perfunidiff -c 1 | $ hg perfunidiff -c 1 | ||||
$ hg perfunidiff --alldata 1 | $ hg perfunidiff --alldata 1 | ||||
$ hg perfbookmarks | $ hg perfbookmarks | ||||
$ hg perfbranchmap | $ hg perfbranchmap | ||||
$ hg perfcca | $ hg perfcca | ||||
$ hg perfchangegroupchangelog | $ hg perfchangegroupchangelog | ||||
$ hg perfchangegroupchangelog --version 01 | $ hg perfchangegroupchangelog --version 01 | ||||
Mercurial Distributed SCM (version 4.8+262-efd0f79246e3+20181122) | |||||
(see https://mercurial-scm.org for more information) | |||||
Copyright (C) 2005-2018 Matt Mackall and others | |||||
This is free software; see the source for copying conditions. There is NO | |||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |||||
$ hg perfchangeset 2 | $ hg perfchangeset 2 | ||||
$ hg perfctxfiles 2 | $ hg perfctxfiles 2 | ||||
$ hg perfdiffwd | $ hg perfdiffwd | ||||
$ hg perfdirfoldmap | $ hg perfdirfoldmap | ||||
$ hg perfdirs | $ hg perfdirs | ||||
$ hg perfdirstate | $ hg perfdirstate | ||||
$ hg perfdirstatedirs | $ hg perfdirstatedirs | ||||
$ hg perfdirstatefoldmap | $ hg perfdirstatefoldmap |