[Zope-CVS] CVS: Products/FileCacheManager/tests - stresstest.py:1.4
Jens Vagelpohl
jens at dataflake.org
Wed Aug 18 11:57:45 EDT 2004
Update of /cvs-repository/Products/FileCacheManager/tests
In directory cvs.zope.org:/tmp/cvs-serv2177/tests
Modified Files:
stresstest.py
Log Message:
- add simple writers to stresstest script
=== Products/FileCacheManager/tests/stresstest.py 1.3 => 1.4 ===
--- Products/FileCacheManager/tests/stresstest.py:1.3 Tue Aug 17 10:38:40 2004
+++ Products/FileCacheManager/tests/stresstest.py Wed Aug 18 11:57:43 2004
@@ -53,7 +53,7 @@
PYSCRIPT_BODY = """
"""
READERS=10
-WRITERS=0
+WRITERS=3
ITERATIONS = 100
# End tweakable items
######################
@@ -152,7 +152,7 @@
if not data:
print 'N',
- self.stdout.flush()
+ sys.stdout.flush()
if data != original_data:
print 'E',
sys.stdout.flush()
@@ -171,11 +171,20 @@
def __init__(self, root, paths, iterations):
self.root = root
self.paths = paths
- sef.iterations = iterations
+ self.iterations = iterations
self.finished = 0
threading.Thread.__init__(self)
def run(self):
+ for i in range(self.iterations):
+ for path in self.paths:
+ root = makerequest.makerequest(self.root)
+ ob = root.unrestrictedTraverse(path)
+ print ':',
+ sys.stdout.flush()
+ original_data = IMAGES.get(ob.getId())
+ ob.manage_upload(file=original_data)
+
self.finished = 1
def isFinished(self):
More information about the Zope-CVS
mailing list