Package org.jboss.test.jbossmx.performance.dynamic.support

Examples of org.jboss.test.jbossmx.performance.dynamic.support.Dyn


         ObjectName name = new ObjectName(":performanceTest=dynamic");
         String method = "methodInvocation";
         long start = 0, end = 0;
         float avg = 0l;

         server.registerMBean(new Dyn(), name);

         // drop the first batch (+1)
         for (int testIterations = 0; testIterations < REPEAT_COUNT + 1; ++testIterations)
         {
            start = System.currentTimeMillis();
View Full Code Here


         ObjectName name = new ObjectName("Domain:performanceTest=dynamic");
         String method = "methodInvocation";
         long start = 0, end = 0;
         float avg = 0l;

         server.registerMBean(new Dyn(), name);

         // drop the first batch (+1)
         for (int testIterations = 0; testIterations < REPEAT_COUNT + 1; ++testIterations)
         {
            start = System.currentTimeMillis();
View Full Code Here

         log.debug(ITERATION_COUNT + " Invocations, Repeat: x" + REPEAT_COUNT);
         log.debug("(this may take a while...)\n");

         MBeanServer server = MBeanServerFactory.createMBeanServer();
         ObjectName name = new ObjectName("Domain:performanceTest=dynamic");
         Dyn mbean = new Dyn();
         String method = "counter";
         long start = 0, end = 0;
         float avg = 0l;

         server.registerMBean(mbean, name);

         // drop the first batch (+1)
         for (int testIterations = 0; testIterations < REPEAT_COUNT + 1; ++testIterations)
         {
            start = System.currentTimeMillis();
            for (int invocationIterations = 0; invocationIterations < ITERATION_COUNT; ++invocationIterations)
            {
               server.invoke(name, method, null, null);
            }
            end = System.currentTimeMillis();

            if (testIterations != 0)
            {
               long time = end - start;
               System.out.print( time + " ");
               avg += time;
            }
         }

         log.debug("\nAverage: " + (avg/REPEAT_COUNT));

         assertTrue(mbean.getCount() == (REPEAT_COUNT + 1)*ITERATION_COUNT);
      }
      catch (Throwable t)
      {
         log.debug("failed", t);
         fail("Unexpected error: " + t.toString());
View Full Code Here

         log.debug(ITERATION_COUNT + " Invocations, Repeat: x" + REPEAT_COUNT);
         log.debug("(this may take a while...)\n");

         MBeanServer server = MBeanServerFactory.createMBeanServer();
         ObjectName name    = new ObjectName("Domain:performanceTest=dynamic");
         Dyn mbean      = new Dyn();
        
         String method      = "mixedArguments";
         String[] signature = new String[] {
                                 Integer.class.getName(),
                                 int.class.getName(),
View Full Code Here

TOP

Related Classes of org.jboss.test.jbossmx.performance.dynamic.support.Dyn

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.