[Pkg-bazaar-commits] ./bzr/unstable r930: - weavebench allows number of iterations to be given as command line

Martin Pool mbp at sourcefrog.net
Fri Apr 10 08:21:29 UTC 2009


------------------------------------------------------------
revno: 930
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Sun 2005-07-17 15:38:43 -0300
message:
  - weavebench allows number of iterations to be given as command line
    argument
modified:
  tools/weavebench.py
-------------- next part --------------
=== modified file 'tools/weavebench.py'
--- a/tools/weavebench.py	2005-07-11 05:47:08 +0000
+++ b/tools/weavebench.py	2005-07-17 18:38:43 +0000
@@ -29,10 +29,10 @@
 import sys
 
 WEAVE_NAME = "bench.weave"
-NUM_REVS = 10000
+NUM_REVS = 2000
 
 def build():
-    pb = ProgressBar()
+    pb = ProgressBar(show_eta=False)
 
     wf = Weave()
     lines = []
@@ -89,6 +89,15 @@
             
 
 if '-p' in sys.argv[1:]:
+    opt_p = True
+    sys.argv.remove('-p')
+else:
+    opt_p = False
+
+if len(sys.argv) > 1:
+    NUM_REVS = int(sys.argv[1])
+
+if opt_p:
     profileit(build)
 else:
     build()



More information about the Pkg-bazaar-commits mailing list