package org.jperf.example;

import org.jperf.PerfTest;
import org.jperf.PerfTestFactory;
import org.jperf.PerfTestRunner;

/**
 * Runs the examples.
 *
 */
public class Main {

    public static void main(String[] args) throws Exception {
        doTest(NewDateFormatTest.class);
        doTest(SynchronizedDateFormatTest.class);
        doTest(ThreadLocalDateFormatTest.class);
    }

    private static void doTest(final Class theClass) throws Exception {
        PerfTestRunner r = new PerfTestRunner();
        r.setMinThread(1);
        r.setMaxThread(10);
        r.setTestPeriod(500);
        r.run(new PerfTestFactory() {
            @Override
            public PerfTest createPerfTest() throws Exception {
                return (PerfTest) theClass.newInstance();
            }
        });
    }
}

@@ -224,32 +224,64 @@
 ows Exception %7B%0A
+        doTest(NoOpTest.class);%0A
         doTest(N
@@ -475,32 +475,85 @@
 ows Exception %7B%0A
+%09System.out.println(%22Testing %22 + theClass + %22 ...%22);%0A
         PerfTest

add NoOpTest