Examples of runCycle()


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

    public void testListSinglePass() {
        ThreadRankLister lister = new TestThreadRankLister(mBeanServerRegistry)
                .feed(1, "Thread-1", 100, 0)
                .feed(2, "Thread-2", 100, 0);

        lister.runCycle(100);

        List<ThreadRankItem> items = lister.list();
        assertEquals(2, items.size());
    }
View Full Code Here

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

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

    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

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

    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

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

                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

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

                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

Examples of com.jitlogic.zorka.core.test.perfmon.support.TestThreadRankLister.runCycle()

    public void testTwoPassesAndCheckIfNonExistentThreadsAreRemoved() {
        TestThreadRankLister lister = new TestThreadRankLister(mBeanServerRegistry)
                .feed(1, "Thread-1", 100, 0)
                .feed(2, "Thread-2", 100, 0);

        lister.runCycle(1000);

        lister.clear()
                .feed(1, "Thread-1", 100, 0)
                .feed(3, "Thread-3", 100, 0);
View Full Code Here

Examples of com.jitlogic.zorka.core.test.perfmon.support.TestThreadRankLister.runCycle()

        lister.clear()
                .feed(1, "Thread-1", 100, 0)
                .feed(3, "Thread-3", 100, 0);

        lister.runCycle(2000);

        List<ThreadRankItem> items = lister.list();

        assertEquals(2, items.size());
    }
View Full Code Here

Examples of com.jitlogic.zorka.core.test.perfmon.support.TestThreadRankLister.runCycle()


    @Test
    public void testTwoPassesAndCheckAverages() {
        TestThreadRankLister lister = new TestThreadRankLister(mBeanServerRegistry).feed(1, "Thread-1", 1000, 500);
        lister.runCycle(1000);
        lister.clear().feed(1, "Thread-1", 2000, 1500);
        lister.runCycle(2000);

        ThreadRankItem item = lister.list().get(0);
        assertEquals(5.0, item.getAverage(0L, 0, 0), 0.001);
View Full Code Here

Examples of com.jitlogic.zorka.core.test.perfmon.support.TestThreadRankLister.runCycle()

    @Test
    public void testTwoPassesAndCheckAverages() {
        TestThreadRankLister lister = new TestThreadRankLister(mBeanServerRegistry).feed(1, "Thread-1", 1000, 500);
        lister.runCycle(1000);
        lister.clear().feed(1, "Thread-1", 2000, 1500);
        lister.runCycle(2000);

        ThreadRankItem item = lister.list().get(0);
        assertEquals(5.0, item.getAverage(0L, 0, 0), 0.001);
    }
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.