[pLog-svn] r3424 - plog/trunk/tools
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Tue May 16 17:23:09 GMT 2006
Author: oscar
Date: 2006-05-16 17:23:07 +0000 (Tue, 16 May 2006)
New Revision: 3424
Modified:
plog/trunk/tools/play.py
Log:
now data is copied to another structure in the thread, insted of reusing self.data
Modified: plog/trunk/tools/play.py
===================================================================
--- plog/trunk/tools/play.py 2006-05-16 16:12:08 UTC (rev 3423)
+++ plog/trunk/tools/play.py 2006-05-16 17:23:07 UTC (rev 3424)
@@ -24,6 +24,7 @@
self.id = id
self.wait = wait
self.data = data
+ self.results = []
self.max_request_time = 0
self.min_request_time = 999999
self.avg_time_per_request = 0
@@ -87,6 +88,9 @@
line['req_time'] = req_time_diff
line['http_response'] = response.status
line['timestamp'] = time.asctime(time.localtime())
+
+ # save this request
+ self.results.append( line )
# save the time it took to perform this request
self.total_time = self.total_time + req_time_diff
@@ -270,7 +274,7 @@
print "Writing thread " + str( t.id) + " data to file " + filename
td = open( filename, "w" )
td.write( "ReqId,Timestamp,Url,HttpResponse,Type,Time\n")
- for req in t.data:
+ for req in t.results:
string = str( req['id'] ) + "," + str( req['timestamp'] ) + "," + \
str( req['url'] ) + "," + str( req['http_response'] ) + "," + \
str( req['type'] ) + "," + str( req['req_time'] ) + "\n"
More information about the pLog-svn
mailing list