Package com.jitlogic.zorka.core.spy

Examples of com.jitlogic.zorka.core.spy.SpyContext



    @Test
    public void testSubmitAndCheckOnCollectBuf() throws Exception {
        SpyDefinition sdef = engine.add(spy.instance("x").onEnter(collector));
        SpyContext ctx = engine.lookup(new SpyContext(sdef, "Class", "method", "()V", 1));

        submitter.submit(ON_ENTER, ctx.getId(), SF_IMMEDIATE, new Object[]{1L});

        assertEquals(1, collector.size());
        assertEquals(3, collector.get(0).size());
    }
View Full Code Here



    @Test
    public void testSubmitAndCheckSubmitBuffer() throws Exception {
        SpyDefinition sdef = engine.add(spy.instrument("x").onSubmit(collector));
        SpyContext ctx = engine.lookup(new SpyContext(sdef, "Class", "method", "()V", 1));

        submitter.submit(ON_ENTER, ctx.getId(), SF_NONE, new Object[]{1L});
        submitter.submit(ON_RETURN, ctx.getId(), SF_FLUSH, new Object[]{2L});

        assertEquals(1, collector.size());

        Map<String, Object> sr = collector.get(0);
View Full Code Here

    }


    @Test
    public void testCtxSubst() {
        SpyContext ctx = new SpyContext(spy.instance("x"), "some.pkg.TClass", "testMethod", "()V", 1);

        assertEquals("some.pkg.TClass", ctx.subst("${className}"));
        assertEquals("some.pkg", ctx.subst("${packageName}"));
        assertEquals("TClass", ctx.subst("${shortClassName}"));
        assertEquals("testMethod", ctx.subst("${methodName}"));
    }
View Full Code Here

TOP

Related Classes of com.jitlogic.zorka.core.spy.SpyContext

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.