[Zope-CVS] CVS: Products/FileCacheManager/tests - stresstest.py:1.6
Jens Vagelpohl
jens at dataflake.org
Wed Aug 18 15:03:22 EDT 2004
Update of /cvs-repository/Products/FileCacheManager/tests
In directory cvs.zope.org:/tmp/cvs-serv19209/tests
Modified Files:
stresstest.py
Log Message:
- simplified info printout
- now expanded to run against a single ZEO storage (meaning you have to have
one running first!)
=== Products/FileCacheManager/tests/stresstest.py 1.5 => 1.6 ===
--- Products/FileCacheManager/tests/stresstest.py:1.5 Wed Aug 18 14:46:16 2004
+++ Products/FileCacheManager/tests/stresstest.py Wed Aug 18 15:03:21 2004
@@ -18,6 +18,7 @@
import ZODB
from ZODB.MappingStorage import MappingStorage
+from ZEO.ClientStorage import ClientStorage
from ZPublisher.Iterators import filestream_iterator
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import noSecurityManager
@@ -53,15 +54,16 @@
PYSCRIPT_BODY = """
"""
READERS=10
-WRITERS=3
-ITERATIONS = 50
+WRITERS=2
+ITERATIONS = 10
# End tweakable items
######################
def setUp():
# First, create a ZODB for the ZODB-based objects
- s = MappingStorage()
+ #s = MappingStorage()
+ s = ClientStorage(('127.0.0.1', 18001))
db = ZODB.DB(s)
jar = db.open()
app_root = jar.root()
@@ -169,10 +171,12 @@
sys.stdout.flush()
c_counter += 1
- print '\n\nReader %d: %d total requests' % (self.number, counter)
- print 'Reader %d: %d empty responses' % (self.number, n_counter)
- print 'Reader %d: %d times faulty data returned' % (self.number, e_counter)
- print 'Reader %d: %d empty results in cache' % (self.number, c_counter)
+ print '\n\nReader %d: %d total / %d empty / %d faulty / %d empty cache' % ( self.number
+ , counter
+ , n_counter
+ , e_counter
+ , c_counter
+ )
sys.stdout.flush()
self.finished = 1
More information about the Zope-CVS
mailing list