contrib/revsetbenchmarks.py
author Pierre-Yves David <pierre-yves.david@fb.com>
Fri, 25 Apr 2014 13:35:31 -0700
changeset 21286 f0f810096842
parent 21202 c04e5e937139
child 21287 2d93b74335a2
permissions -rwxr-xr-x
revsetbenchmark: add a usage message when no arguments are passed This increase the odd someone who didn't wrote will it find out how to use this script.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20848
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
     1
#!/usr/bin/env python
20745
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
     2
20746
47fc466825da contrib: have the revset benchmark test script take a revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20745
diff changeset
     3
# Measure the performance of a list of revsets against multiple revisions
47fc466825da contrib: have the revset benchmark test script take a revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20745
diff changeset
     4
# defined by parameter. Checkout one by one and run perfrevset with every
47fc466825da contrib: have the revset benchmark test script take a revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20745
diff changeset
     5
# revset in the list to benchmark its performance.
20745
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
     6
#
20747
8c89433ccdcf contrib: make revset benchmark script able to read from stdin
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20746
diff changeset
     7
# - First argument is a revset of mercurial own repo to runs against.
8c89433ccdcf contrib: make revset benchmark script able to read from stdin
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20746
diff changeset
     8
# - Second argument is the file from which the revset array will be taken
8c89433ccdcf contrib: make revset benchmark script able to read from stdin
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20746
diff changeset
     9
#   If second argument is omitted read it from standard input
20745
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    10
#
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    11
# You should run this from the root of your mercurial repository.
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    12
#
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    13
# This script also does one run of the current version of mercurial installed
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    14
# to compare performance.
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    15
20848
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    16
import sys
20893
b5de9dde181c revsetbenchmark: remove python 2.7 dependency
Durham Goode <durham@fb.com>
parents: 20855
diff changeset
    17
from subprocess import check_call, Popen, CalledProcessError, STDOUT, PIPE
20850
d0c2535c7aba revsetbenchmark: convert update to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20849
diff changeset
    18
20893
b5de9dde181c revsetbenchmark: remove python 2.7 dependency
Durham Goode <durham@fb.com>
parents: 20855
diff changeset
    19
def check_output(*args, **kwargs):
b5de9dde181c revsetbenchmark: remove python 2.7 dependency
Durham Goode <durham@fb.com>
parents: 20855
diff changeset
    20
    kwargs.setdefault('stderr', PIPE)
b5de9dde181c revsetbenchmark: remove python 2.7 dependency
Durham Goode <durham@fb.com>
parents: 20855
diff changeset
    21
    kwargs.setdefault('stdout', PIPE)
b5de9dde181c revsetbenchmark: remove python 2.7 dependency
Durham Goode <durham@fb.com>
parents: 20855
diff changeset
    22
    proc = Popen(*args, **kwargs)
b5de9dde181c revsetbenchmark: remove python 2.7 dependency
Durham Goode <durham@fb.com>
parents: 20855
diff changeset
    23
    output, error = proc.communicate()
b5de9dde181c revsetbenchmark: remove python 2.7 dependency
Durham Goode <durham@fb.com>
parents: 20855
diff changeset
    24
    if proc.returncode != 0:
21202
c04e5e937139 revsetbenchmark: fix error raising
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20893
diff changeset
    25
        raise CalledProcessError(proc.returncode, ' '.join(args[0]))
20893
b5de9dde181c revsetbenchmark: remove python 2.7 dependency
Durham Goode <durham@fb.com>
parents: 20855
diff changeset
    26
    return output
20848
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    27
20850
d0c2535c7aba revsetbenchmark: convert update to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20849
diff changeset
    28
def update(rev):
d0c2535c7aba revsetbenchmark: convert update to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20849
diff changeset
    29
    """update the repo to a revision"""
d0c2535c7aba revsetbenchmark: convert update to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20849
diff changeset
    30
    try:
d0c2535c7aba revsetbenchmark: convert update to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20849
diff changeset
    31
        check_call(['hg', 'update', '--quiet', '--check', str(rev)])
d0c2535c7aba revsetbenchmark: convert update to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20849
diff changeset
    32
    except CalledProcessError, exc:
d0c2535c7aba revsetbenchmark: convert update to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20849
diff changeset
    33
        print >> sys.stderr, 'update to revision %s failed, aborting' % rev
d0c2535c7aba revsetbenchmark: convert update to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20849
diff changeset
    34
        sys.exit(exc.returncode)
d0c2535c7aba revsetbenchmark: convert update to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20849
diff changeset
    35
20851
4130ec938c84 revsetbenchmark: convert performance call to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20850
diff changeset
    36
def perf(revset):
4130ec938c84 revsetbenchmark: convert performance call to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20850
diff changeset
    37
    """run benchmark for this very revset"""
4130ec938c84 revsetbenchmark: convert performance call to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20850
diff changeset
    38
    try:
20854
bad5399c5d5f revsetbenchmark: retrieve the benchmark value in python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20853
diff changeset
    39
        output = check_output(['./hg',
bad5399c5d5f revsetbenchmark: retrieve the benchmark value in python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20853
diff changeset
    40
                               '--config',
bad5399c5d5f revsetbenchmark: retrieve the benchmark value in python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20853
diff changeset
    41
                               'extensions.perf=contrib/perf.py',
bad5399c5d5f revsetbenchmark: retrieve the benchmark value in python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20853
diff changeset
    42
                               'perfrevset',
bad5399c5d5f revsetbenchmark: retrieve the benchmark value in python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20853
diff changeset
    43
                               revset],
bad5399c5d5f revsetbenchmark: retrieve the benchmark value in python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20853
diff changeset
    44
                               stderr=STDOUT)
bad5399c5d5f revsetbenchmark: retrieve the benchmark value in python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20853
diff changeset
    45
        output = output.lstrip('!') # remove useless ! in this context
bad5399c5d5f revsetbenchmark: retrieve the benchmark value in python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20853
diff changeset
    46
        return output.strip()
20851
4130ec938c84 revsetbenchmark: convert performance call to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20850
diff changeset
    47
    except CalledProcessError, exc:
4130ec938c84 revsetbenchmark: convert performance call to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20850
diff changeset
    48
        print >> sys.stderr, 'abort: cannot run revset benchmark'
4130ec938c84 revsetbenchmark: convert performance call to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20850
diff changeset
    49
        sys.exit(exc.returncode)
4130ec938c84 revsetbenchmark: convert performance call to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20850
diff changeset
    50
20852
b2353501d6dc revsetbenchmark: convert revision display to proper subprocesscall
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20851
diff changeset
    51
def printrevision(rev):
b2353501d6dc revsetbenchmark: convert revision display to proper subprocesscall
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20851
diff changeset
    52
    """print data about a revision"""
b2353501d6dc revsetbenchmark: convert revision display to proper subprocesscall
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20851
diff changeset
    53
    sys.stdout.write("Revision: ")
b2353501d6dc revsetbenchmark: convert revision display to proper subprocesscall
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20851
diff changeset
    54
    sys.stdout.flush()
b2353501d6dc revsetbenchmark: convert revision display to proper subprocesscall
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20851
diff changeset
    55
    check_call(['hg', 'log', '--rev', str(rev), '--template',
b2353501d6dc revsetbenchmark: convert revision display to proper subprocesscall
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20851
diff changeset
    56
               '{desc|firstline}\n'])
b2353501d6dc revsetbenchmark: convert revision display to proper subprocesscall
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20851
diff changeset
    57
20853
95293cf67871 revsetbenchmark: get revision to benchmark in a function
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20852
diff changeset
    58
def getrevs(spec):
95293cf67871 revsetbenchmark: get revision to benchmark in a function
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20852
diff changeset
    59
    """get the list of rev matched by a revset"""
95293cf67871 revsetbenchmark: get revision to benchmark in a function
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20852
diff changeset
    60
    try:
95293cf67871 revsetbenchmark: get revision to benchmark in a function
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20852
diff changeset
    61
        out = check_output(['hg', 'log', '--template={rev}\n', '--rev', spec])
95293cf67871 revsetbenchmark: get revision to benchmark in a function
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20852
diff changeset
    62
    except CalledProcessError, exc:
95293cf67871 revsetbenchmark: get revision to benchmark in a function
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20852
diff changeset
    63
        print >> sys.stderr, "abort, can't get revision from %s" % spec
95293cf67871 revsetbenchmark: get revision to benchmark in a function
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20852
diff changeset
    64
        sys.exit(exc.returncode)
95293cf67871 revsetbenchmark: get revision to benchmark in a function
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20852
diff changeset
    65
    return [r for r in out.split() if r]
95293cf67871 revsetbenchmark: get revision to benchmark in a function
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20852
diff changeset
    66
95293cf67871 revsetbenchmark: get revision to benchmark in a function
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20852
diff changeset
    67
20745
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    68
21286
f0f810096842 revsetbenchmark: add a usage message when no arguments are passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21202
diff changeset
    69
if len(sys.argv) < 2:
f0f810096842 revsetbenchmark: add a usage message when no arguments are passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21202
diff changeset
    70
    print >> sys.stderr, 'usage: %s <revs> [file]' % sys.argv[0]
f0f810096842 revsetbenchmark: add a usage message when no arguments are passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21202
diff changeset
    71
    sys.exit(255)
f0f810096842 revsetbenchmark: add a usage message when no arguments are passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21202
diff changeset
    72
20848
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    73
target_rev = sys.argv[1]
20745
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    74
20848
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    75
revsetsfile = sys.stdin
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    76
if len(sys.argv) > 2:
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    77
    revsetsfile = open(sys.argv[2])
20745
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    78
20848
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    79
revsets = [l.strip() for l in revsetsfile]
20745
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    80
20848
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    81
print "Revsets to benchmark"
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    82
print "----------------------------"
20745
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    83
20848
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    84
for idx, rset in enumerate(revsets):
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    85
    print "%i) %s" % (idx, rset)
20745
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    86
20848
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    87
print "----------------------------"
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    88
print
20745
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    89
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    90
20853
95293cf67871 revsetbenchmark: get revision to benchmark in a function
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20852
diff changeset
    91
revs = getrevs(target_rev)
20745
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
    92
20855
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
    93
results = []
20848
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    94
for r in revs:
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    95
    print "----------------------------"
20852
b2353501d6dc revsetbenchmark: convert revision display to proper subprocesscall
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20851
diff changeset
    96
    printrevision(r)
20848
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
    97
    print "----------------------------"
20850
d0c2535c7aba revsetbenchmark: convert update to proper subprocess call
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20849
diff changeset
    98
    update(r)
20855
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
    99
    res = []
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   100
    results.append(res)
20848
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
   101
    for idx, rset in enumerate(revsets):
20855
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   102
        data = perf(rset)
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   103
        res.append(data)
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   104
        print "%i)" % idx, data
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   105
        sys.stdout.flush()
20848
11a9393609c8 revsetbenchmark: simplify and convert the script to python
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20847
diff changeset
   106
    print "----------------------------"
20745
5fb7c36d751f contrib: added revset performance benchmarking script
Lucas Moscovicz <lmoscovicz@fb.com>
parents:
diff changeset
   107
20855
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   108
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   109
print """
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   110
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   111
Result by revset
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   112
================
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   113
"""
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   114
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   115
print 'Revision:', revs
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   116
for idx, rev in enumerate(revs):
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   117
    sys.stdout.write('%i) ' % idx)
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   118
    sys.stdout.flush()
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   119
    printrevision(rev)
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   120
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   121
print
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   122
print
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   123
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   124
for ridx, rset in enumerate(revsets):
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   125
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   126
    print "revset #%i: %s" % (ridx, rset)
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   127
    for idx, data in enumerate(results):
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   128
        print '%i) %s' % (idx, data[ridx])
dfad9bb23ab4 revsetbenchmark: add a summary at the end of execution
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20854
diff changeset
   129
    print