<commit_before>/*******************************************************************************
 * Copyright (c) 2016 <NAME>
 * This file is licensed under the terms of the MIT license.
 * See the LICENSE.txt file for more info.
 * 
 * Contributors:
 *     <NAME> - initial API and implementation
 ******************************************************************************/
package org.cryptomator.siv;

import org.junit.Test;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;

public class BenchmarkTest {

	@Test
	public void runBenchmarks() throws RunnerException {
		// Taken from http://stackoverflow.com/a/30486197/4014509:
		Options opt = new OptionsBuilder()
				// Specify which benchmarks to run
				.include(getClass().getPackage().getName() + ".*Benchmark.*")
				// Set the following options as needed
				.threads(2).forks(2) //
				.shouldFailOnError(true).shouldDoGC(true)
				// .jvmArgs("-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining")
				// .addProfiler(WinPerfAsmProfiler.class)
				.build();

		new Runner(opt).run();
	}

}<commit_msg>Skip benchmarks on jdk7 ci system<commit_after>/*******************************************************************************
 * Copyright (c) 2016 <NAME>
 * This file is licensed under the terms of the MIT license.
 * See the LICENSE.txt file for more info.
 * 
 * Contributors:
 *     <NAME> - initial API and implementation
 ******************************************************************************/
package org.cryptomator.siv;

import org.junit.Test;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;

public class BenchmarkTest {

	@Test
	public void runBenchmarks() throws RunnerException {
		if (System.getProperty("java.version").startsWith("1.8")) {
			// Taken from http://stackoverflow.com/a/30486197/4014509:
			Options opt = new OptionsBuilder()
					// Specify which benchmarks to run
					.include(getClass().getPackage().getName() + ".*Benchmark.*")
					// Set the following options as needed
					.threads(2).forks(2) //
					.shouldFailOnError(true).shouldDoGC(true)
					// .jvmArgs("-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining")
					// .addProfiler(WinPerfAsmProfiler.class)
					.build();

			new Runner(opt).run();
		} else {
			System.out.println("Skipping Benchmarks");
		}
	}

}
{'fraction_non_alphanumeric': 0.24004683840749413, 'fraction_numerical': 0.01756440281030445, 'mean_word_length': 4.395789473684211, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6715301', 'n_tokens_mistral': 873, 'n_tokens_neox': 746, 'n_words': 166}