Examples of addMBeanAttribute()


Examples of info.ganglia.jmxetric.MBeanSampler.addMBeanAttribute()

    @Test
    public void sampleLong() throws Exception {
        MBeanSampler sampler = new MBeanSampler(0, 30000, "TEST") ;
        MyPublisher publisher = new MyPublisher() ;
        sampler.setPublisher(publisher);
        sampler.addMBeanAttribute(BEAN_NAME, "Long", GMetricType.INT32,
            "bytes", GMetricSlope.BOTH, "Longer");
        sampler.run() ;
        String value = publisher.getResult("Longer");
        assertEquals( Example.LONG_VALUE, Long.valueOf(value ));
    }
View Full Code Here

Examples of info.ganglia.jmxetric.MBeanSampler.addMBeanAttribute()

        MBeanSampler sampler = new MBeanSampler(0, 30000, "TEST") ;
        MyPublisher publisher = new MyPublisher() ;
        sampler.setPublisher(publisher);
       
        String compNamePublishName = "compName";
        sampler.addMBeanAttribute(BEAN_NAME,
                    "Composite",
                    "name",
                    GMetricType.STRING,
                    "bytes",
                    GMetricSlope.BOTH,
View Full Code Here

Examples of info.ganglia.jmxetric.MBeanSampler.addMBeanAttribute()

                    "bytes",
                    GMetricSlope.BOTH,
                    compNamePublishName);
       
        String compIntPublishName = "compInt";
        sampler.addMBeanAttribute(BEAN_NAME,
                      "Composite",
                      "integer",
                      GMetricType.STRING,
                      "bytes",
                      GMetricSlope.BOTH,
View Full Code Here

Examples of info.ganglia.jmxetric.MBeanSampler.addMBeanAttribute()

                      "bytes",
                      GMetricSlope.BOTH,
                      compIntPublishName);
       
        String compDatePublishName = "compDate";
        sampler.addMBeanAttribute(BEAN_NAME,
                  "Composite",
                  "date",
                  GMetricType.STRING,
                  "bytes",
                  GMetricSlope.BOTH,
View Full Code Here

Examples of info.ganglia.jmxetric.MBeanSampler.addMBeanAttribute()

    @Test
    public void sampleCounter() throws Exception {
        MBeanSampler sampler = new MBeanSampler(0, 1, "TEST") ;
        MyPublisher publisher = new MyPublisher() ;
        sampler.setPublisher(publisher);
        sampler.addMBeanAttribute(BEAN_NAME, "Counter", GMetricType.INT32,
            "units", GMetricSlope.POSITIVE, "counter");
        sampler.run() ;
        String value = publisher.getResult("counter");
        assertTrue( Integer.valueOf(value) >= 0);
    }
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.