Permalink
Browse files

MB-100: fix mcsoda logging format

Change-Id: I28cf273dbd76921fe3d8953492a8403e6a7e6e9e
Reviewed-on: http://review.couchbase.org/22768
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Tested-by: Pavel Paulau <pavel.paulau@gmail.com>
  • Loading branch information...
1 parent a4a721c commit 6499f17fec32fe29b41b402c5f35fcd32099d488 @pavel-paulau pavel-paulau committed Nov 22, 2012
Showing with 7 additions and 7 deletions.
  1. +2 −3 lib/perf_engines/mcsoda.py
  2. +5 −4 pytests/performance/perf.py
@@ -1527,14 +1527,13 @@ def stop_after(secs):
t_end = time.time()
# Final stats
- log.info("")
log.info(dict_to_s(cur))
total_time = float(t_end - t_start)
if cur.get('cur-queries', 0):
total_cmds = cur.get('cur-queries', 0)
else:
total_cmds = cur.get('cur-gets', 0) + cur.get('cur-sets', 0)
- log.info(" ops/sec: %s" % (total_cmds / total_time))
+ log.info("ops/sec: %s" % (total_cmds / total_time))
threads = [t for t in threads if t.isAlive()]
heartbeat = 0
@@ -1543,7 +1542,7 @@ def stop_after(secs):
heartbeat += 1
if heartbeat >= 60:
heartbeat = 0
- log.info(" mcsoda is running with %s threads" % len(threads))
+ log.info("mcsoda is running with %s threads" % len(threads))
threads = [t for t in threads if t.isAlive()]
log.warn("Exiting because... there is nothing else to do")
@@ -3,6 +3,7 @@
import threading
import os
import subprocess
+import pprint
from TestInput import TestInputSingleton
from lib import logger
@@ -727,8 +728,8 @@ def load(self, num_items, min_value_size=None,
self.log.info("mcsoda - %s %s %s %s" %
(protocol, host_port, user, pswd))
- self.log.info("mcsoda - cfg: " + str(cfg))
- self.log.info("mcsoda - cur: " + str(cur))
+ self.log.info("mcsoda - cfg:\n" + pprint.pformat(cfg))
+ self.log.info("mcsoda - cur:\n" + pprint.pformat(cfg))
cur, start_time, end_time = \
self.mcsoda_run(cfg, cur, protocol, host_port, user, pswd,
@@ -992,8 +993,8 @@ def loop(self, num_ops=None,
self.log.info("mcsoda - %s %s %s %s" %
(protocol, host_port, user, pswd))
- self.log.info("mcsoda - cfg: " + str(cfg))
- self.log.info("mcsoda - cur: " + str(self.cur))
+ self.log.info("mcsoda - cfg:\n" + pprint.pformat(cfg))
+ self.log.info("mcsoda - cur:\n" + pprint.pformat(cfg))
self.log.info("mcsoda - backups: %s" % backups)
# For query tests always use StoreCouchbase

0 comments on commit 6499f17

Please sign in to comment.