Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Better output

  • Loading branch information...
commit 5e581bc2dcea4dc114c2062ec57810431834efc0 1 parent b25cf84
@CloudMarc authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 mq.py
View
9 mq.py
@@ -136,7 +136,7 @@ def run(self):
doAll(self.bUrl, self.key, self.msg_id, self.token, self.project_id, self.host, self.port)
dt = time.time() - t0
success = success + 1
- print '+' + str(dt)
+ print str(time.time()) + ' + ' + str(dt)
except:
print "Unexpected error: " , sys.exc_info()[0]
failure = failure + 1
@@ -149,12 +149,13 @@ def run(self):
ta = []
t0 = time.time()
runcount = 10
-for i in range(runcount):
+nThreads = 2
+for i in range(nThreads):
msg_id = "notset"
th = myThread(i, "Thread-"+str(i),0, bUrl, key, msg_id, token, project_id, host, port, runcount)
th.start()
ta.append(th)
- j = j + runcount
+ j = j + 1
#print str(ta)
for th in ta:
@@ -162,5 +163,5 @@ def run(self):
th.join()
tTot = time.time() - t0
-tAvg = tTot/(1.0*j*runcount)
+tAvg = tTot/(1.0*nThreads*runcount)
print "Average time per op: " + str(tAvg)
Please sign in to comment.
Something went wrong with that request. Please try again.