diff options
author | John Wiegley <johnw@newartisans.com> | 2009-01-31 06:00:31 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-01-31 06:00:31 -0400 |
commit | 0bab6e867441c4d9d62b436e0aac48b7dc0096a3 (patch) | |
tree | 5b1db4106302abc952a454511f52f2f1f2a6ab01 /tools/average | |
parent | f749a1bb1eb40faa9cac685a02d012a5efb11aaa (diff) | |
download | fork-ledger-0bab6e867441c4d9d62b436e0aac48b7dc0096a3.tar.gz fork-ledger-0bab6e867441c4d9d62b436e0aac48b7dc0096a3.tar.bz2 fork-ledger-0bab6e867441c4d9d62b436e0aac48b7dc0096a3.zip |
Added a tools/ subdirectory, with various maintainer related files.
Diffstat (limited to 'tools/average')
-rwxr-xr-x | tools/average | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/average b/tools/average new file mode 100755 index 00000000..0e95c1c5 --- /dev/null +++ b/tools/average @@ -0,0 +1,26 @@ +#!/usr/bin/python + +import getopt +import time +import string +import sys +import os + +count = 10 + +opts, args = getopt.getopt(sys.argv[1:], "n:") +for opt in opts: + if opt[0] == "-n": + count = int(opt[1]) + +length = 0.0 + +i = 0 +while i < count: + begin = time.time() + cmd = '"' + string.join(args, '" "') + '"'; + os.system(cmd) + length += time.time() - begin + i += 1 + +print >> sys.stderr, length / count |