/** * Creates a timer object that manages a set of timers based on the bucket * function supplied. Calling record will be mapped to the record on the appropriate timer. * * @param registry * Registry to use. * @param id * Identifier for the metric being registered. * @param f * Function to map values to buckets. * @return * Timer that manages sub-timers based on the bucket function. */ public static BucketTimer get(Registry registry, Id id, BucketFunction f) { return new BucketTimer( com.netflix.spectator.api.histogram.BucketTimer.get(registry, id, f)); }
/** * Creates a timer object that manages a set of timers based on the bucket * function supplied. Calling record will be mapped to the record on the appropriate timer. * * @param id * Identifier for the metric being registered. * @param f * Function to map values to buckets. * @return * Timer that manages sub-timers based on the bucket function. */ public static BucketTimer get(Id id, BucketFunction f) { return get(Spectator.globalRegistry(), id, f); }
BucketTimer.get(REGISTRY, COMPLETE.withTags(dimensions.tags()), BUCKETS) .record(entry.getOverallLatency(), TimeUnit.MILLISECONDS); BucketTimer.get(REGISTRY, ATTEMPT.withTags(dimensions.tags()), BUCKETS) .record(entry.getLatency(), TimeUnit.MILLISECONDS); REGISTRY.distributionSummary(REQ_HEADER_SIZE.withTags(dimensions.tags())) .record(entry.getRequestHeadersLength());
BucketTimer.get(REGISTRY, COMPLETE.withTags(dimensions.tags()), BUCKETS) .record(entry.getOverallLatency(), TimeUnit.MILLISECONDS); BucketTimer.get(REGISTRY, ATTEMPT.withTags(dimensions.tags()), BUCKETS) .record(entry.getLatency(), TimeUnit.MILLISECONDS); REGISTRY.distributionSummary(REQ_HEADER_SIZE.withTags(dimensions.tags())) .record(entry.getRequestHeadersLength());
/** * Creates a timer object that manages a set of timers based on the bucket * function supplied. Calling record will be mapped to the record on the appropriate timer. * * @param id * Identifier for the metric being registered. * @param f * Function to map values to buckets. * @return * Timer that manages sub-timers based on the bucket function. */ public static BucketTimer get(Id id, BucketFunction f) { return get(Spectator.globalRegistry(), id, f); }
/** * Creates a timer object that manages a set of timers based on the bucket * function supplied. Calling record will be mapped to the record on the appropriate timer. * * @param registry * Registry to use. * @param id * Identifier for the metric being registered. * @param f * Function to map values to buckets. * @return * Timer that manages sub-timers based on the bucket function. */ public static BucketTimer get(Registry registry, Id id, BucketFunction f) { return new BucketTimer( com.netflix.spectator.api.histogram.BucketTimer.get(registry, id, f)); }