LoadTesting

specify source for pickle file

6/4/2018 2:13:59 PM

Changes

Details

diff --git a/oregon/locustEvents.py b/oregon/locustEvents.py
index f7bc7f8..53fa794 100644
--- a/oregon/locustEvents.py
+++ b/oregon/locustEvents.py
@@ -53,14 +53,14 @@ def on_chunk(**kw):
 	rate = 0
 	if timeSpent > 0:
 		rate= bytesRecvd/timeSpent
-	metrics['throughput'].append({'time':time.time(), 'len':bytesRecvd, 'timeSpent':timeSpent, 'downloads':downloads, 'rate':rate})	
+	metrics['throughput'].append({'time':time.time(), 'len':bytesRecvd, 'timeSpent':timeSpent, 'downloads':downloads, 'rate':rate})
 chunkHook += on_chunk
 
 def exiting():
 	# pass
 	global metrics
 	tfin = int(time.time())
-	f = open('../results/%d_results.pkl'%tfin, 'wb')
+	f = open('../results/%d_results_oregon.pkl'%tfin, 'wb')
 	pickle.dump(metrics, f)
 	f.flush()
 	f.close()
@@ -69,4 +69,4 @@ def exiting():
 
 
 
-events.quitting += exiting
\ No newline at end of file
+events.quitting += exiting
diff --git a/qsi/locustEvents.py b/qsi/locustEvents.py
index f7bc7f8..e78da53 100644
--- a/qsi/locustEvents.py
+++ b/qsi/locustEvents.py
@@ -53,14 +53,14 @@ def on_chunk(**kw):
 	rate = 0
 	if timeSpent > 0:
 		rate= bytesRecvd/timeSpent
-	metrics['throughput'].append({'time':time.time(), 'len':bytesRecvd, 'timeSpent':timeSpent, 'downloads':downloads, 'rate':rate})	
+	metrics['throughput'].append({'time':time.time(), 'len':bytesRecvd, 'timeSpent':timeSpent, 'downloads':downloads, 'rate':rate})
 chunkHook += on_chunk
 
 def exiting():
 	# pass
 	global metrics
 	tfin = int(time.time())
-	f = open('../results/%d_results.pkl'%tfin, 'wb')
+	f = open('../results/%d_results_qsi.pkl'%tfin, 'wb')
 	pickle.dump(metrics, f)
 	f.flush()
 	f.close()
@@ -69,4 +69,4 @@ def exiting():
 
 
 
-events.quitting += exiting
\ No newline at end of file
+events.quitting += exiting