[Zodb-checkins] CVS: StandaloneZODB/ZEO/tests - speed.py:1.5

Jeremy Hylton [email protected]
Fri, 7 Sep 2001 15:41:52 -0400


Update of /cvs-repository/StandaloneZODB/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv16450

Modified Files:
	speed.py 
Log Message:
Merge in zeo-1_0-branch

Remove Python 2.x-isms so that tests run under Python 1.5.2



=== StandaloneZODB/ZEO/tests/speed.py 1.4 => 1.5 ===
     if threads > 1:
         import threading
-        l = [threading.Thread(target=work,
-                              args=(db, results, nrep, compress, data,
-                                    detailed, minimize, i))
-             for i in range(threads)]
+        l = []
+        for i in range(threads):
+            t = threading.Thread(target=work,
+                                 args=(db, results, nrep, compress, data,
+                                       detailed, minimize, i))
+            l.append(t)
         for t in l:
             t.start()
         for t in l:
@@ -263,7 +265,9 @@
         print '-'*24
     print "num\tmean\tmin\tmax"
     for r in 1, 10, 100, 1000:
-        times = [time for time, conf in results[r]]
+        times = []
+        for time, conf in results[r]:
+            times.append(time)
         t = mean(times)
         print "%d\t%.4f\t%.4f\t%.4f" % (r, t, min(times), max(times))