contrib/revsetbenchmarks.py
changeset 20855 dfad9bb23ab4
parent 20854 bad5399c5d5f
child 20893 b5de9dde181c
equal deleted inserted replaced
20854:bad5399c5d5f 20855:dfad9bb23ab4
    76 print
    76 print
    77 
    77 
    78 
    78 
    79 revs = getrevs(target_rev)
    79 revs = getrevs(target_rev)
    80 
    80 
       
    81 results = []
    81 for r in revs:
    82 for r in revs:
    82     print "----------------------------"
    83     print "----------------------------"
    83     printrevision(r)
    84     printrevision(r)
    84     print "----------------------------"
    85     print "----------------------------"
    85     update(r)
    86     update(r)
       
    87     res = []
       
    88     results.append(res)
    86     for idx, rset in enumerate(revsets):
    89     for idx, rset in enumerate(revsets):
    87 
    90         data = perf(rset)
    88         print "%i)" % idx, perf(rset)
    91         res.append(data)
       
    92         print "%i)" % idx, data
       
    93         sys.stdout.flush()
    89     print "----------------------------"
    94     print "----------------------------"
    90 
    95 
       
    96 
       
    97 print """
       
    98 
       
    99 Result by revset
       
   100 ================
       
   101 """
       
   102 
       
   103 print 'Revision:', revs
       
   104 for idx, rev in enumerate(revs):
       
   105     sys.stdout.write('%i) ' % idx)
       
   106     sys.stdout.flush()
       
   107     printrevision(rev)
       
   108 
       
   109 print
       
   110 print
       
   111 
       
   112 for ridx, rset in enumerate(revsets):
       
   113 
       
   114     print "revset #%i: %s" % (ridx, rset)
       
   115     for idx, data in enumerate(results):
       
   116         print '%i) %s' % (idx, data[ridx])
       
   117     print