Show More
@@ -25,6 +25,7 b' import random' | |||||
25 | import sys |
|
25 | import sys | |
26 | import time |
|
26 | import time | |
27 | from mercurial import ( |
|
27 | from mercurial import ( | |
|
28 | bdiff, | |||
28 | changegroup, |
|
29 | changegroup, | |
29 | cmdutil, |
|
30 | cmdutil, | |
30 | commands, |
|
31 | commands, | |
@@ -746,6 +747,30 b' def perffncacheencode(ui, repo, **opts):' | |||||
746 | timer(d) |
|
747 | timer(d) | |
747 | fm.end() |
|
748 | fm.end() | |
748 |
|
749 | |||
|
750 | @command('perfbdiff', revlogopts + formatteropts, '-c|-m|FILE REV') | |||
|
751 | def perfbdiff(ui, repo, file_, rev=None, **opts): | |||
|
752 | """benchmark a bdiff between a revision and its delta parent""" | |||
|
753 | if opts.get('changelog') or opts.get('manifest'): | |||
|
754 | file_, rev = None, file_ | |||
|
755 | elif rev is None: | |||
|
756 | raise error.CommandError('perfbdiff', 'invalid arguments') | |||
|
757 | ||||
|
758 | r = cmdutil.openrevlog(repo, 'perfbdiff', file_, opts) | |||
|
759 | ||||
|
760 | node = r.lookup(rev) | |||
|
761 | rev = r.rev(node) | |||
|
762 | dp = r.deltaparent(rev) | |||
|
763 | ||||
|
764 | text1 = r.revision(dp) | |||
|
765 | text2 = r.revision(node) | |||
|
766 | ||||
|
767 | def d(): | |||
|
768 | bdiff.bdiff(text1, text2) | |||
|
769 | ||||
|
770 | timer, fm = gettimer(ui, opts) | |||
|
771 | timer(d) | |||
|
772 | fm.end() | |||
|
773 | ||||
749 | @command('perfdiffwd', formatteropts) |
|
774 | @command('perfdiffwd', formatteropts) | |
750 | def perfdiffwd(ui, repo, **opts): |
|
775 | def perfdiffwd(ui, repo, **opts): | |
751 | """Profile diff of working directory changes""" |
|
776 | """Profile diff of working directory changes""" |
@@ -50,6 +50,7 b' perfstatus' | |||||
50 | perfancestorset |
|
50 | perfancestorset | |
51 | (no help text available) |
|
51 | (no help text available) | |
52 | perfannotate (no help text available) |
|
52 | perfannotate (no help text available) | |
|
53 | perfbdiff benchmark a bdiff between a revision and its delta parent | |||
53 | perfbranchmap |
|
54 | perfbranchmap | |
54 | benchmark the update of a branchmap |
|
55 | benchmark the update of a branchmap | |
55 | perfcca (no help text available) |
|
56 | perfcca (no help text available) | |
@@ -112,6 +113,7 b' perfstatus' | |||||
112 | $ hg perfancestors |
|
113 | $ hg perfancestors | |
113 | $ hg perfancestorset 2 |
|
114 | $ hg perfancestorset 2 | |
114 | $ hg perfannotate a |
|
115 | $ hg perfannotate a | |
|
116 | $ hg perfbdiff -c 1 | |||
115 | $ hg perfbranchmap |
|
117 | $ hg perfbranchmap | |
116 | $ hg perfcca |
|
118 | $ hg perfcca | |
117 | $ hg perfchangegroupchangelog |
|
119 | $ hg perfchangegroupchangelog |
General Comments 0
You need to be logged in to leave comments.
Login now