diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2016-04-07 18:38:50 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2016-04-07 18:38:50 -0700 |
commit | 01efa2f05df48cac2f1e22742aa911a7c0abdb25 (patch) | |
tree | 6f318ad9a44919fafed12f3f0501b19f1f3be02e | |
parent | 37c60c6edea56fedfeb4a22467ec85fca5fc8881 (diff) |
Adding getLookupTable API to MonitoredCCBAPI
-rw-r--r-- | src/com/p4square/grow/ccb/MonitoredCCBAPI.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/com/p4square/grow/ccb/MonitoredCCBAPI.java b/src/com/p4square/grow/ccb/MonitoredCCBAPI.java index 1463c77..43b6433 100644 --- a/src/com/p4square/grow/ccb/MonitoredCCBAPI.java +++ b/src/com/p4square/grow/ccb/MonitoredCCBAPI.java @@ -43,6 +43,21 @@ public class MonitoredCCBAPI implements CCBAPI { } @Override + public GetLookupTableResponse getLookupTable(final GetLookupTableRequest request) throws IOException { + final Timer.Context timer = mMetricRegistry.timer("CCBAPI.getLookupTable.time").time(); + boolean success = false; + try { + final GetLookupTableResponse resp = mAPI.getLookupTable(request); + success = true; + return resp; + } finally { + timer.stop(); + mMetricRegistry.counter("CCBAPI.getLookupTable.success").inc(success ? 1 : 0); + mMetricRegistry.counter("CCBAPI.getLookupTable.failure").inc(!success ? 1 : 0); + } + } + + @Override public GetIndividualProfilesResponse getIndividualProfiles(GetIndividualProfilesRequest request) throws IOException { final Timer.Context timer = mMetricRegistry.timer("CCBAPI.getIndividualProfiles").time(); |