Examples of GMetricString


Examples of info.ganglia.metric.type.GMetricString

  public Metricable createGMetric(String host, String name, String type, String units, int slope, boolean clearValues) {
    Metricable gmetric = null;
    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 {
View Full Code Here

Examples of info.ganglia.metric.type.GMetricString

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

Examples of info.ganglia.metric.type.GMetricString

  @Test
  public void testUpdateString() {
    String value = "10";
    try {
      GMonitor gmon = new GMonitor(MULTICAST_ADDRESS, 30l);
      GMetricString testMetric = (GMetricString) gmon.createGMetric(host, "Ganglia Test", GMetric.VALUE_TYPE_STRING, "count", GMetric.SLOPE_UNSPECIFIED, true);
      testMetric.setValue(value);
      testMetric.setValue(null);
    } 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.