summaryrefslogtreecommitdiff
path: root/benchmarks/localhost_socket.py
diff options
context:
space:
mode:
authorRyan Williams <rdw@lindenlab.com>2010-03-15 14:37:38 -0700
committerRyan Williams <rdw@lindenlab.com>2010-03-15 14:37:38 -0700
commit160580c1555f3ff96c2cc6a4f20c9215217ee44d (patch)
treed9bf2430673f20c727491d0f8d035a041dc73d4d /benchmarks/localhost_socket.py
parent39b24f7f66a7cce3b807c3a9130e6bf1140c9977 (diff)
downloadeventlet-160580c1555f3ff96c2cc6a4f20c9215217ee44d.tar.gz
Two minor tweaks.
Diffstat (limited to 'benchmarks/localhost_socket.py')
-rw-r--r--benchmarks/localhost_socket.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/benchmarks/localhost_socket.py b/benchmarks/localhost_socket.py
index f249255..4e740e4 100644
--- a/benchmarks/localhost_socket.py
+++ b/benchmarks/localhost_socket.py
@@ -6,6 +6,7 @@ import benchmarks
BYTES=1000
SIZE=1
CONCURRENCY=50
+TRIES=5
def reader(sock):
expect = BYTES
@@ -82,16 +83,20 @@ if __name__ == "__main__":
default=SIZE)
parser.add_option('-c', '--concurrency', type='int', dest='concurrency',
default=CONCURRENCY)
+ parser.add_option('-t', '--tries', type='int', dest='tries',
+ default=TRIES)
+
opts, args = parser.parse_args()
BYTES=opts.bytes
SIZE=opts.size
CONCURRENCY=opts.concurrency
+ TRIES=opts.tries
funcs = [launch_green_threads]
if opts.threading:
funcs = [launch_green_threads, launch_heavy_threads]
- results = benchmarks.measure_best(3, 3,
+ results = benchmarks.measure_best(TRIES, 3,
lambda: None, lambda: None,
*funcs)
print "green:", results[launch_green_threads]