@Test
    public void run() throws Exception {
        final String className = getClass().getSimpleName();

        final ChainedOptionsBuilder runnerOptions = new OptionsBuilder()
                .include(".*" + className + ".*")
                .jvmArgs(getJvmArgs());

        if (getWarmupIterations() > 0) {
            runnerOptions.warmupIterations(getWarmupIterations());
        }

        if (getMeasureIterations() > 0) {
            runnerOptions.measurementIterations(getMeasureIterations());
        }

        if (getForks() > 0) {
            runnerOptions.forks(getForks());
        }

        if (getReportDir() != null) {
            final String dtmStr = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
            final String filePath = getReportDir() + className + "-" + dtmStr + ".json";
            final File file = new File(filePath);
            if (file.exists()) {
                file.delete();
            } else {
                file.getParentFile().mkdirs();
                file.createNewFile();
            }

            runnerOptions.resultFormat(ResultFormatType.JSON);
            runnerOptions.result(filePath);
        }

        new Runner(runnerOptions.build()).run();
    }
Base class for all TinkerPop OpenJDK JMH benchmarks.  Based upon Netty's approach to running JMH benchmarks
from JUnit.

@see <a href="http://netty.io/wiki/microbenchmarks.html"</a>

@author Ted Wilmes (http://twilmes.org)
gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tinkerpop/benchmark/util/AbstractBenchmarkBase.java