Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions benchmarks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from optparse import OptionParser
import uuid

from greplin import scales
from cassandra.metrics import getStats

dirname = os.path.dirname(os.path.abspath(__file__))
sys.path.append(dirname)
Expand Down Expand Up @@ -192,7 +192,7 @@ def benchmark(thread_class):
log.info("Total time: %0.2fs" % total)
log.info("Average throughput: %0.2f/sec" % (options.num_ops / total))
if options.enable_metrics:
stats = scales.getStats()['cassandra']
stats = getStats()['cassandra']
log.info("Connection errors: %d", stats['connection_errors'])
log.info("Write timeouts: %d", stats['write_timeouts'])
log.info("Read timeouts: %d", stats['read_timeouts'])
Expand Down
3 changes: 3 additions & 0 deletions cassandra/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1795,6 +1795,9 @@ def shutdown(self):

self.executor.shutdown()

if self.metrics_enabled and self.metrics:
self.metrics.shutdown()

_discard_cluster_shutdown(self)

def __enter__(self):
Expand Down
Loading
Loading