Package com.jitlogic.zorka.core.perfmon

Examples of com.jitlogic.zorka.core.perfmon.TraceOutputJmxScanner.runCycle()


    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());
    }


    @Test
View Full Code Here


    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());
    }


    @Test
View Full Code Here

    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

                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

                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
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.