Examples of GMetricFloat


Examples of info.ganglia.metric.type.GMetricFloat

    if (GMetric.VALUE_TYPE_INT.equals(type)) {
      gmetric = new GMetricInteger(host, name, type, units, slope, clearValues);
    } else if (GMetric.VALUE_TYPE_STRING.equals(type)) {
      gmetric = new GMetricString(host, name, type, units, slope, clearValues);
    } else if (GMetric.VALUE_TYPE_FLOAT.equals(type)) {
      gmetric = new GMetricFloat(host, name, type, units, slope, clearValues);
    } else if (GMetric.VALUE_TYPE_DOUBLE.equals(type)) {
      gmetric = new GMetricDouble(host, name, type, units, slope, clearValues);
    } else {
      throw new IllegalArgumentException("unknown metric type");
    }
View Full Code Here

Examples of info.ganglia.metric.type.GMetricFloat

  @Test
  @SuppressWarnings("unused")
  public void testMetricTypeConstructor3() {
    try {
      GMonitor gmon = new GMonitor(MULTICAST_ADDRESS, 30l);
      GMetricFloat testMetric = (GMetricFloat) gmon.createGMetric(host, "Ganglia Test", GMetric.VALUE_TYPE_FLOAT, "count", GMetric.SLOPE_UNSPECIFIED, true);
    } catch (IOException e) {
      e.printStackTrace();
      fail();
    }
  }
View Full Code Here

Examples of info.ganglia.metric.type.GMetricFloat

  @Test
  public void testUpdateFloat() {
    float value = 10.50f;
    try {
      GMonitor gmon = new GMonitor(MULTICAST_ADDRESS, 30l);
      GMetricFloat testMetric = (GMetricFloat) gmon.createGMetric(host, "Ganglia Test", GMetric.VALUE_TYPE_FLOAT, "count", GMetric.SLOPE_UNSPECIFIED, true);
      testMetric.incrementValue(value);
      testMetric.incrementValue();
      testMetric.setValue(value);
    } catch (IOException e) {
      e.printStackTrace();
      fail();
    }
  }
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.