Skip to content

Instantly share code, notes, and snippets.

David Haikney dhaikney

  • Couchbase
  • Manchester
View GitHub Profile
#!/usr/bin/env - python
from couchbase.bucket import Bucket
import threading
import sys
from multiprocessing.dummy import Pool as ThreadPool
if len(sys.argv) != 7:
print "Usage: " + sys.argv[0] + " <host> <bucket> <count> <size> <conns> <threads>"
dhaikney /
Created Feb 24, 2015
Basic python script to show how Couchbase's stats REST endpoint can be used to garner statistics over time
#!/usr/bin/env python
# Initial version - 24-Feb 2015
# Monitor interesting Couchbase statistics over a period of time
# Stats are captured via calling the REST endpoint which provides individual
# stats for each node. These are then post-processed to provide cluster-wide
# totals before being output to the console.
import json
from collections import defaultdict
import sys
You can’t perform that action at this time.