Examples of MeterMetric


Examples of com.digitalpebble.storm.metrics.MeterMetric

        LOG.debug("Tika loaded in " + (end - start) + " msec");

        this.collector = collector;

        this.eventMeters = context.registerMetric("parser-meter",
                new MeterMetric(), 5);
        this.eventTimers = context.registerMetric("parser-timer",
                new TimerMetric(), 5);
        this.eventHistograms = context.registerMetric("parser-histograms",
                new HistogramMetric(), 5);
View Full Code Here

Examples of com.yammer.metrics.core.MeterMetric

    boolean doSearchTest = conf.getBoolean("perf.test.search", true);

    final TimerMetric searchTimer = Metrics.newTimer(ZoiePerf.class, "searchTimer",
      TimeUnit.NANOSECONDS, TimeUnit.SECONDS);
    final MeterMetric errorMeter = Metrics.newMeter(ZoiePerf.class, "errorMeter", "error",
      TimeUnit.SECONDS);

    monitoredMetrics.put("searchTimer", searchTimer);
    monitoredMetrics.put("errorMeter", errorMeter);

    final long waitTime = conf.getLong("perf.query.threadWait", 200);

    final class SearchThread extends Thread {

      private volatile boolean stop = false;

      public void terminate() {
        stop = true;
        synchronized (this) {
          this.notifyAll();
        }
      }

      @SuppressWarnings({ "unchecked", "rawtypes" })
      @Override
      public void run() {
        while (!stop) {
          try {
            searchTimer.time(new Callable() {
              @Override
              public Object call() throws Exception {
                return testHandler.queryHandler.handleQuery();
              }
            });

          } catch (Exception e) {
            errorMeter.mark();
          }

          synchronized (this) {
            try {
              this.wait(waitTime);
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.