Examples of Meter


Examples of com.codahale.metrics.Meter

    }

    @Test
    public void anExceptionMeteredAnnotatedMethod_WithPublicScope_ButDifferentTypeOfException() throws Exception {

        final Meter metric = registry.getMeters().get(name(InstrumentedWithExceptionMetered.class,
                                                          "failures"));
        assertMetricIsSetup(metric);

        assertThat("Metric intialises to zero",
                   metric.getCount(),
                   is(0L));
        try {
            instance.errorProneMethod(new MyOtherException());
            fail("Expected an exception to be thrown");
        } catch (MyOtherException ignored) {
        }

        assertThat("Metric should not be marked if the exception is a different type",
                   metric.getCount(),
                   is(0L));
    }
View Full Code Here

Examples of com.netflix.suro.servo.Meter

        this.queue4Sink = queue4Sink;
        this.batchSize = batchSize == 0 ? 1000 : batchSize;
        this.batchTimeout = batchTimeout == 0 ? 1000 : batchTimeout;
        this.pauseOnLongQueue = pauseOnLongQueue;

        throughput = new Meter(MonitorConfig.builder(sinkId + "_throughput_meter").build());
    }
View Full Code Here

Examples of com.yammer.metrics.core.Meter

        Histogram readAccess = Metrics.newHistogram(new MetricName(ORG_APACHE_BLUR, HDFS, "Read Latency in \u00B5s",
            scope));
        Histogram writeAccess = Metrics.newHistogram(new MetricName(ORG_APACHE_BLUR, HDFS, "Write Latency in \u00B5s",
            scope));
        Meter readThroughput = Metrics.newMeter(new MetricName(ORG_APACHE_BLUR, HDFS, "Read Throughput", scope),
            "Read Bytes", TimeUnit.SECONDS);
        Meter writeThroughput = Metrics.newMeter(new MetricName(ORG_APACHE_BLUR, HDFS, "Write Throughput", scope),
            "Write Bytes", TimeUnit.SECONDS);
        metricsGroup = new MetricsGroup(readAccess, writeAccess, readThroughput, writeThroughput);
        metricsGroupMap.put(uri, metricsGroup);
      }
      this.metricsGroup = metricsGroup;
View Full Code Here

Examples of com.yammer.metrics.core.Meter

    MetricName readThroughputName = new MetricName(ORG_APACHE_BLUR, HDFS, "Read Throughput", scope);
    MetricName writeThroughputName = new MetricName(ORG_APACHE_BLUR, HDFS, "Write Throughput", scope);

    Histogram readAccess = Metrics.newHistogram(readAccessName);
    Histogram writeAccess = Metrics.newHistogram(writeAcccessName);
    Meter readThroughput = Metrics.newMeter(readThroughputName, "Read Bytes", TimeUnit.SECONDS);
    Meter writeThroughput = Metrics.newMeter(writeThroughputName, "Write Bytes", TimeUnit.SECONDS);
    return new MetricsGroup(readAccess, writeAccess, readThroughput, writeThroughput);
  }
View Full Code Here

Examples of it.eng.spagobi.engines.chart.bo.charttypes.dialcharts.Meter

      }
      else if(subtype.equalsIgnoreCase(thermomether)){
        sbi= new Thermometer();
      }
      else if(subtype.equalsIgnoreCase(meter)){
        sbi= new Meter();
      }
      else if(subtype.equalsIgnoreCase(bullet)){
        sbi= new BulletGraph();
      }
    }
View Full Code Here

Examples of it.eng.spagobi.engines.kpi.bo.charttypes.dialcharts.Meter

      else if(subtype.equalsIgnoreCase("Thermometer")){
        sbi= new Thermometer();
        logger.debug("Thermometer chart instanciated");
      }
      else if(subtype.equalsIgnoreCase("Meter")){
        sbi= new Meter();
        logger.debug("Meter chart instanciated");
      }
      else if(subtype.equalsIgnoreCase("BulletGraph")){
        sbi= new BulletGraph();
        logger.debug("Meter chart instanciated");
View Full Code Here

Examples of org.apache.pivot.wtk.Meter

    @Override
    public void install(Component component) {
        super.install(component);

        Meter meter = (Meter)component;
        meter.getMeterListeners().add(this);
    }
View Full Code Here

Examples of org.apache.pivot.wtk.Meter

        return false;
    }

    @Override
    public int getPreferredWidth(int height) {
        Meter meter = (Meter)getComponent();

        int preferredWidth;

        if (meter.getOrientation() == Orientation.HORIZONTAL) {
            String text = meter.getText();

            if (text != null
                && text.length() > 0) {
                Rectangle2D stringBounds = font.getStringBounds(text, FONT_RENDER_CONTEXT);
                preferredWidth = (int)Math.ceil(stringBounds.getWidth()) + 2;
View Full Code Here

Examples of org.apache.pivot.wtk.Meter

        return preferredWidth;
    }

    @Override
    public int getPreferredHeight(int width) {
        Meter meter = (Meter)getComponent();

        int preferredHeight;

        if (meter.getOrientation() == Orientation.HORIZONTAL) {
            preferredHeight = getPreferredWidth(width);
        } else {
            String text = meter.getText();

            if (text != null
                && text.length() > 0) {
                LineMetrics lm = font.getLineMetrics("", FONT_RENDER_CONTEXT);
                preferredHeight = (int)Math.ceil(lm.getHeight()) + 2;
View Full Code Here

Examples of org.apache.pivot.wtk.Meter

        return preferredHeight;
    }

    @Override
    public Dimensions getPreferredSize() {
        Meter meter = (Meter)getComponent();
        String text = meter.getText();

        int preferredWidth = 0;
        int preferredHeight = 0;
        if (text != null
            && text.length() > 0) {
            Rectangle2D stringBounds = font.getStringBounds(text, FONT_RENDER_CONTEXT);
            preferredWidth = (int)Math.ceil(stringBounds.getWidth()) + 2;

            LineMetrics lm = font.getLineMetrics("", FONT_RENDER_CONTEXT);
            preferredHeight = (int)Math.ceil(lm.getHeight()) + 2;
        }

        // If meter has no content, its preferred size is hard coded by the class
        preferredWidth = Math.max(preferredWidth, DEFAULT_WIDTH);
        preferredHeight = Math.max(preferredHeight, DEFAULT_HEIGHT);

        Dimensions preferredSize;
        if (meter.getOrientation() == Orientation.HORIZONTAL) {
            preferredSize = new Dimensions(preferredWidth, preferredHeight);
        } else {
            preferredSize = new Dimensions(preferredHeight, preferredWidth);
        }
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.