Package com.yammer.metrics.core

Examples of com.yammer.metrics.core.TimerContext.stop()


            TimerContext timer = _callbackExecutionTime.time();
            try {
                return callback.call(handle.getService());
            } finally {
                timer.stop();
            }
        } catch (NoCachedInstancesAvailableException e) {
            LOG.debug("Service cache exhausted. End point ID: {}", endPoint.getId(), e);
            // Don't mark an end point as bad just because there are no cached end points for it.
            throw e;
View Full Code Here


                return service;
            } catch (Exception e) {
                _loadFailureCount.incrementAndGet();
                throw e;
            } finally {
                timer.stop();
            }
        }

        @Override
        public void destroyObject(ServiceEndPoint endPoint, S service) throws Exception {
View Full Code Here

     */
    public void process(final Iterable<T> stream, final String topic) {
        for (final T message : stream) {
            final TimerContext context = processed.time();
            process(message, topic);
            context.stop();
        }
    }
}
View Full Code Here

                        mods -= c;
                    }
                    TimerContext ctxt;
                    ctxt = TREE_TIMER.time();
                    canon.putAll(buffer);
                    ctxt.stop();
                    ctxt = BTREE_TIMER.time();
                    btree = BTree.update(btree, ICMP, buffer.keySet(), true, null);
                    ctxt.stop();

                    if (quickEquality)
View Full Code Here

                    ctxt = TREE_TIMER.time();
                    canon.putAll(buffer);
                    ctxt.stop();
                    ctxt = BTREE_TIMER.time();
                    btree = BTree.update(btree, ICMP, buffer.keySet(), true, null);
                    ctxt.stop();

                    if (quickEquality)
                        testEqual("", BTree.<Integer>slice(btree, true), canon.keySet().iterator());
                    else
                        r.addAll(testAllSlices("RND", btree, canon.navigableKeySet()));
View Full Code Here

            create(Arrays.asList(objects));
        } catch (Exception e) {
            createExceptionsMeter.mark();
            throw Throwables.propagate(e);
        } finally {
            timer.stop();
        }
    }

    @Timed
    @ExceptionMetered
View Full Code Here

    final TimerContext time = metricsPublishTransferTime.time();

    final boolean isSaved = amazonService.save(path, file);

    time.stop();

    if (isSaved) {

      metricsPublishFileCount.inc();
      metricsPublishFileSize.inc(file.length());
View Full Code Here

            TimerContext timer = _callbackExecutionTime.time();
            try {
                return callback.call(service);
            } finally {
                timer.stop();
            }
        } catch (NoCachedInstancesAvailableException e) {
            LOG.debug("Service cache exhausted. End point ID: " + endPoint.getId(), e);
            // Don't mark an end point as bad just because there are no cached end points for it.
            throw e;
View Full Code Here

                            }
                        } while (retry.allowRetry(++numAttempts, sw.elapsedMillis()));

                        throw new MaxRetriesException(lastException);
                    } finally {
                        timer.stop();
                    }
                }
            });

            futures.add(future);
View Full Code Here

                        mods -= c;
                    }
                    TimerContext ctxt;
                    ctxt = TREE_TIMER.time();
                    canon.putAll(buffer);
                    ctxt.stop();
                    ctxt = BTREE_TIMER.time();
                    Object[] next = null;
                    while (next == null)
                        next = BTree.update(btree, ICMP, buffer.keySet(), true, SPORADIC_ABORT);
                    btree = next;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.