diff options
author | Raymond Hettinger <python@rcn.com> | 2011-04-26 20:55:55 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-04-26 20:55:55 (GMT) |
commit | 40fc59d98b70902f140aaf3c3e4c2b0739a9f1bc (patch) | |
tree | 082f364f553cd21d79e5724415e8a321472d67e6 /Doc/includes/mp_benchmarks.py | |
parent | 30fe8188b4ccf8a620faf7bb38413b5a81c67ed3 (diff) | |
download | cpython-40fc59d98b70902f140aaf3c3e4c2b0739a9f1bc.zip cpython-40fc59d98b70902f140aaf3c3e4c2b0739a9f1bc.tar.gz cpython-40fc59d98b70902f140aaf3c3e4c2b0739a9f1bc.tar.bz2 |
Issue 11929: Minor whitespace clean-ups.
Diffstat (limited to 'Doc/includes/mp_benchmarks.py')
-rw-r--r-- | Doc/includes/mp_benchmarks.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Doc/includes/mp_benchmarks.py b/Doc/includes/mp_benchmarks.py index 72d4426..acdf642 100644 --- a/Doc/includes/mp_benchmarks.py +++ b/Doc/includes/mp_benchmarks.py @@ -5,7 +5,12 @@ # All rights reserved. # -import time, sys, multiprocessing, threading, queue, gc +import time +import sys +import multiprocessing +import threading +import queue +import gc if sys.platform == 'win32': _timer = time.clock @@ -111,7 +116,7 @@ def test_seqspeed(seq): for i in range(iterations): a = seq[5] - elapsed = _timer()-t + elapsed = _timer() - t print(iterations, 'iterations in', elapsed, 'seconds') print('average number/sec:', iterations/elapsed) @@ -132,7 +137,7 @@ def test_lockspeed(l): l.acquire() l.release() - elapsed = _timer()-t + elapsed = _timer() - t print(iterations, 'iterations in', elapsed, 'seconds') print('average number/sec:', iterations/elapsed) @@ -169,7 +174,7 @@ def test_conditionspeed(Process, c): c.notify() c.wait() - elapsed = _timer()-t + elapsed = _timer() - t c.release() p.join() |