<commit_before>package dk.ilios.spanner;

import android.support.test.InstrumentationRegistry;

import org.junit.runner.RunWith;

import java.io.File;

import dk.ilios.spanner.example.Utils;
import dk.ilios.spanner.junit.SpannerRunner;

@RunWith(SpannerRunner.class)
public class UnitTestBenchmarks {

    private File filesDir = InstrumentationRegistry.getTargetContext().getFilesDir();
    private File resultsDir = new File(filesDir, "results");
    private File baseLineFile = Utils.copyFromAssets("baseline.json");

    @BenchmarkConfiguration
    public SpannerConfig configuration = new SpannerConfig.Builder()
            .saveResults(resultsDir, UnitTestBenchmarks.class.getCanonicalName() + ".json")
            .useBaseline(baseLineFile)
            .maxFailureLimit(1.0f) // Accept 100% difference, normally should be 10-15%
            .minFailureLimit(1.0f) // Accept 100% difference, normally should be 10-15%
            .meanFailureLimit(1.0f) // Accept 100% difference, normally should be 10-15%
            .medianFailureLimit(1.0f) // Accept 100% difference, normally should be 10-15%
            .uploadResults()
            .build();

    // Public test parameters (value chosen and injected by Experiment)
    @Param(value = {"java.util.Date", "java.lang.Object"})
    public String value;

    // Private fields used by benchmark methods
    private Class testClass;

    @BeforeExperiment
    public void before() {
        try {
            testClass = Class.forName(value);
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }<commit_msg>Remove limit on baseline difference.<commit_after>package dk.ilios.spanner;

import android.support.test.InstrumentationRegistry;

import org.junit.runner.RunWith;

import java.io.File;

import dk.ilios.spanner.config.RuntimeInstrumentConfig;
import dk.ilios.spanner.example.Utils;
import dk.ilios.spanner.internal.RuntimeInstrument;
import dk.ilios.spanner.junit.SpannerRunner;

@RunWith(SpannerRunner.class)
public class UnitTestBenchmarks {

    private File filesDir = InstrumentationRegistry.getTargetContext().getFilesDir();
    private File resultsDir = new File(filesDir, "results");
    private File baseLineFile = Utils.copyFromAssets("baseline.json");

    @BenchmarkConfiguration
    public SpannerConfig configuration = new SpannerConfig.Builder()
            .saveResults(resultsDir, UnitTestBenchmarks.class.getCanonicalName() + ".json") // Save results to disk
            .useBaseline(baseLineFile) // Compare against a baseline
            .medianFailureLimit(Float.MAX_VALUE) // Fail if difference vs. baseline is to big. Should normally be 10-15%  (0.15)
            .addInstrument(RuntimeInstrumentConfig.defaultConfig()) // Configure how benchmark is run/measured
            .build();

    // Public test parameters (value chosen and injected by Experiment)
    @Param(value = {"java.util.Date", "java.lang.Object"})
    public String value;

    // Private fields used by benchmark methods
    private Class testClass;

    @BeforeExperiment
    public void before() {
        try {
            testClass = Class.forName(value);
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
{'fraction_non_alphanumeric': 0.09815950920245399, 'fraction_numerical': 0.013190184049079755, 'mean_word_length': 3.3134920634920637, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6816984', 'n_tokens_mistral': 943, 'n_tokens_neox': 884, 'n_words': 225}