~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to tools/weavebench.py

  • Committer: Martin Pool
  • Date: 2005-07-17 18:38:43 UTC
  • Revision ID: mbp@sourcefrog.net-20050717183843-6e57535ea3a77241
- weavebench allows number of iterations to be given as command line
  argument

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
import sys
30
30
 
31
31
WEAVE_NAME = "bench.weave"
32
 
NUM_REVS = 10000
 
32
NUM_REVS = 2000
33
33
 
34
34
def build():
35
 
    pb = ProgressBar()
 
35
    pb = ProgressBar(show_eta=False)
36
36
 
37
37
    wf = Weave()
38
38
    lines = []
89
89
            
90
90
 
91
91
if '-p' in sys.argv[1:]:
 
92
    opt_p = True
 
93
    sys.argv.remove('-p')
 
94
else:
 
95
    opt_p = False
 
96
 
 
97
if len(sys.argv) > 1:
 
98
    NUM_REVS = int(sys.argv[1])
 
99
 
 
100
if opt_p:
92
101
    profileit(build)
93
102
else:
94
103
    build()