Created
September 3, 2014 20:25
-
-
Save rnewson/dc9c8dd3f456af8c31b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var test_metrics = function(metrics) { | |
if (metrics.type === "counter") { | |
test_counter(metrics); | |
} else if (metrics.type === "histogram") { | |
test_histogram(metrics); | |
} else { | |
for (var k in metrics) { | |
test_metrics(metrics[k]); | |
} | |
} | |
}; | |
(function() { | |
var summary = JSON.parse(CouchDB.request("GET", "/_stats", { | |
headers: {"Accept": "application/json"} | |
}).responseText); | |
T(typeof(summary) === 'object'); | |
test_metrics(summary); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment