Skip to content

Instantly share code, notes, and snippets.

@rnewson
Created September 3, 2014 20:32
Show Gist options
  • Save rnewson/2b722e282a89dd9bd6ef to your computer and use it in GitHub Desktop.
Save rnewson/2b722e282a89dd9bd6ef to your computer and use it in GitHub Desktop.
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) {
if (metrics.hasOwnProperty(k)) {
test_metrics(metrics[k]);
}
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment