Package com.jitlogic.zorka.core.perfmon

Examples of com.jitlogic.zorka.core.perfmon.TraceOutputJmxScanner


    }


    @Test
    public void testSimpleNullScan() throws Exception {
        TraceOutputJmxScanner scanner = perfmon.scanner("TEST",
                new QueryDef("test", "test:type=XXX,*", "name").get("Nom")
                        .metric(perfmon.metric("test", "test")));
        ObjectInspector.setField(scanner, "output", out);
        scanner.runCycle(100);
        Assert.assertEquals(0, results.size());
    }
View Full Code Here


    }


    @Test
    public void testSimpleScanWithOneResult() throws Exception {
        TraceOutputJmxScanner scanner = perfmon.scanner("TEST",
                new QueryDef("test", "test:type=TestJmx,*", "name").get("Nom")
                        .metric(perfmon.metric("test", "test")));
        ObjectInspector.setField(scanner, "output", out);
        scanner.runCycle(100);
        Assert.assertEquals(1, results.size());
    }
View Full Code Here

    }


    @Test
    public void testCheckIfMetricObjectsAreRegisteredAndHaveIds() throws Exception {
        TraceOutputJmxScanner scanner = perfmon.scanner("TEST",
                new QueryDef("test", "test:type=TestJmx,*", "name").get("Nom")
                        .metric(perfmon.metric("test", "test")));
        ObjectInspector.setField(scanner, "output", out);
        scanner.runCycle(100);
        List<PerfSample> samples = ((PerfRecord) results.get(0)).getSamples();

        Assert.assertNotNull(samples);
        Assert.assertEquals(2, samples.size());

View Full Code Here

    // TODO check for dynamic attributes being passed and attached correctly

    @Test
    public void testCheckIfDynamicAttributesArePassedCorrectly() throws Exception {
        TraceOutputJmxScanner scanner = perfmon.scanner("TEST",
                new QueryDef("test", "test:type=TestJmx,*", "name").getAs("Nom", "ATTR")
                        .metric(
                                perfmon.metric("test", "test").dynamicAttrs("ATTR")));
        ObjectInspector.setField(scanner, "output", out);

        scanner.runCycle(100);
        List<PerfSample> samples = ((PerfRecord) results.get(0)).getSamples();

        Assert.assertNotNull(samples);
        Assert.assertEquals(2, samples.size());

View Full Code Here

    }


    @Test
    public void testCheckIfOutputDataIsProperlyCast() throws Exception {
        TraceOutputJmxScanner scanner = perfmon.scanner("TEST",
                new QueryDef("test", "test:type=TestJmx,*", "name").getAs("Nom", "ATTR")
                        .metric(
                                perfmon.metric("test", "test").dynamicAttrs("ATTR")));
        ObjectInspector.setField(scanner, "output", out);

        scanner.runCycle(100);
        List<PerfSample> samples = ((PerfRecord) results.get(0)).getSamples();

        Assert.assertNotNull(samples);
        Assert.assertEquals(2, samples.size());

View Full Code Here

TOP

Related Classes of com.jitlogic.zorka.core.perfmon.TraceOutputJmxScanner

Copyright © 2018 www.massapicom. 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.