cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r897753 - /incubator/cassandra/trunk/contrib/py_stress/stress.py
Date Mon, 11 Jan 2010 03:56:13 GMT
Author: jbellis
Date: Mon Jan 11 03:56:12 2010
New Revision: 897753

URL: http://svn.apache.org/viewvc?rev=897753&view=rev
Log:
better stress.py fix.  patch by jbellis

Modified:
    incubator/cassandra/trunk/contrib/py_stress/stress.py

Modified: incubator/cassandra/trunk/contrib/py_stress/stress.py
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/contrib/py_stress/stress.py?rev=897753&r1=897752&r2=897753&view=diff
==============================================================================
--- incubator/cassandra/trunk/contrib/py_stress/stress.py (original)
+++ incubator/cassandra/trunk/contrib/py_stress/stress.py Mon Jan 11 03:56:12 2010
@@ -254,10 +254,10 @@
             latency = sum(self.latencies[th.idx] for th in threads)
             delta = total - old_total
             delta_latency = latency - old_latency
-            delta_formatted = delta if delta > 0 else 'NAN'
+            delta_formatted = (delta_latency / delta) if delta > 0 else 'NAN'
             elapsed_t = int(time.time() - start_t)
             outf.write('%d,%d,%s,%d\n' 
-                       % (total, delta / options.interval, delta_latency / delta, elapsed_t))
+                       % (total, delta / options.interval, delta_formatted, elapsed_t))
             if not [th for th in threads if th.isAlive()]:
                 break
 



Mime
View raw message