Package net.sourceforge.groboutils.junit.v1

Examples of net.sourceforge.groboutils.junit.v1.MultiThreadedTestRunner


    TestRunnable[] trs = new TestRunnable[threads];
    for (int t = 0; t < threads; t++) {
      trs[t] = new VolatileIntCountWorker(i);
    }

    MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(trs);

    //kickstarts the MTTR & fires off threads
    long start = System.nanoTime();
    mttr.runTestRunnables();
    System.out.println("Runtime for volatile primative: "
        + (System.nanoTime() - start) + "ns");

    //dump our ints into a set
    Set<Integer> intList = new HashSet<Integer>(setSize);
View Full Code Here


    for (int t = 0; t < threads; t++) {
      trs[t] = new ClientWorker();
    }
    trs[threads] = new InvokeWorker(trs);
    System.out.println("Created workers: " + trs.length);
    MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(trs);
    try {
      mttr.runTestRunnables();
    } catch (Throwable e1) {
      e1.printStackTrace();
    }
    System.out.println("Run complete");
    for (TestRunnable r : trs) {
View Full Code Here

      trs[t] = new ClientCreatorWorker();
    }
    Runtime rt = Runtime.getRuntime();
    long startFreeMem = rt.freeMemory();
    System.out.printf("Free mem: %s\n", startFreeMem);
    MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(trs);
    long start = System.nanoTime();
    mttr.runTestRunnables();
    System.out.printf("Runtime: %s ns\n", (System.nanoTime() - start));
    for (TestRunnable r : trs) {
      IClient cli = ((ClientCreatorWorker) r).getClient();
      assertTrue(cli == null);
    }
View Full Code Here

        // test runnables represent clients
        trs = new TestRunnable[2];
        for (int t = 0; t < 2; t++) {
          trs[t] = new SOClientWorker(t, app, room);
        }
        MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(trs);

        // fires off threads
        long start = System.nanoTime();
        mttr.runTestRunnables();
        System.out.println("Runtime: " + (System.nanoTime() - start) + "ns");

        for (TestRunnable r : trs) {
          SOClientWorker cl = (SOClientWorker) r;
          log.debug("Worker: {} shared object: {}", cl.getId(), cl.getSO().getAttributes());
View Full Code Here

    assertNotNull(app.getSharedObject(room2, soName, false));
    // test runnables represent clients
    trs = new TestRunnable[2];
    trs[0] = new SOClientWorkerA(0, app, room1);
    trs[1] = new SOClientWorkerB(1, app, room2);
    MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(trs);
    // fires off threads
    long start = System.nanoTime();
    mttr.runTestRunnables();
    System.out.println("Runtime: " + (System.nanoTime() - start) + "ns");
    SOClientWorkerA soa = (SOClientWorkerA) trs[0];
    log.debug("Worker: {} shared object: {}", soa.getId(), soa.getSO().getAttributes());
    SOClientWorkerB sob = (SOClientWorkerB) trs[1];
    log.debug("Worker: {} shared object: {}", sob.getId(), sob.getSO().getAttributes());
View Full Code Here

        for (int i = 0; i < RUNNER_COUNT; i++) {
            ClientThread thread = new OracleDialectEpsgMediatorOnlineStressTest.ClientThread(i, mediator);
            thread.iterations = ITERATIONS;
            runners[i] = thread;
        }
        MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(runners, null);
        mttr.runTestRunnables(MAX_TIME);
       
        //count exceptions and metrics
        int exceptions = 0;
        for (int i = 0; i < RUNNER_COUNT; i++) {
            ClientThread thread = (ClientThread) runners[i];
View Full Code Here

        for (int i = 0; i < RUNNER_COUNT; i++) {
            ClientThread thread = new ClientThread(i, mediator);
            thread.iterations = ITERATIONS;
            runners[i] = thread;
        }
        MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(runners, null);
        long timeStart = System.currentTimeMillis();
        mttr.runTestRunnables(MAX_TIME);
       
        long timeElapsed = System.currentTimeMillis() - timeStart;
       
        //count exceptions and metrics
        int exceptions = 0;
View Full Code Here

        for (int i = 0; i < RUNNER_COUNT; i++) {
            ClientThread thread = new ClientThread(i, mediator);
            thread.iterations = ITERATIONS;
            runners[i] = thread;
        }
        MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(runners, null);
        long timeStart = System.currentTimeMillis();
        mttr.runTestRunnables(MAX_TIME);
        long timeElapsed = System.currentTimeMillis() - timeStart;
       
        //count exceptions and metrics
        int exceptions = 0;
        int totalTime = 0;
View Full Code Here

        for (int i = 0; i < RUNNER_COUNT; i++) {
            ClientThread thread = new HsqlDialectEpsgMediatorStressTest.ClientThread(i, mediator);
            thread.iterations = ITERATIONS;
            runners[i] = thread;
        }
        MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(runners, null);
        mttr.runTestRunnables(MAX_TIME);
       
        //count exceptions and metrics
        int exceptions = 0;
        for (int i = 0; i < RUNNER_COUNT; i++) {
            ClientThread thread = (ClientThread) runners[i];
View Full Code Here

        for (int i = 0; i < RUNNER_COUNT; i++) {
            ClientThread thread = new ClientThread(i, mediator);
            thread.iterations = ITERATIONS;
            runners[i] = thread;
        }
        MultiThreadedTestRunner mttr = new MultiThreadedTestRunner(runners, null);
        long timeStart = System.currentTimeMillis();
        mttr.runTestRunnables(MAX_TIME);
        long timeElapsed = System.currentTimeMillis() - timeStart;

        //count exceptions and metrics
        int exceptions = 0;
        int totalTime = 0;
View Full Code Here

TOP

Related Classes of net.sourceforge.groboutils.junit.v1.MultiThreadedTestRunner

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.