Skip to content

Instantly share code, notes, and snippets.

Created Jul 17, 2015
What would you like to do?
Gather metrics using codahale stuff
Counter failCounter = new Counter();
Counter successCounter = new Counter();
Timer timer = new Timer();
public Y transform(X x) {
Timer.Context time = timer.time();
try {
Y transform = delegate.transform(x);;
return transform;
} catch (Exception e) {;
throw e;
} finally {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment