<commit_before>var _user$project$Native_Benchmark = (function () {
    function bench(name, fn) {
	return {
	    name: name,
	    fn: fn
	}
    }

    function suite(name, fnList) {
	var fns = _elm_lang$core$Native_List.toArray(fnList),
	    suite = new Benchmark.Suite(name),
	    i, curr;

	for (i = 0; i < fns.length; i++) {
	    curr = fns[i];
	    suite = suite.add(curr.name, curr.fn);
	}

	return suite;
    }

    function run(suiteList, program) {
	var suites = _elm_lang$core$Native_List.toArray(suiteList),
	    i;

	for (i = 0; i < suites.length; i++) {
	    suites[i].on('start', function () {
		console.log('Starting ' + this.name + ' suite.');
	    }).on('cycle', function (event) {
		console.log(String(event.target));
	    }).on('complete', function () {
		console.log('Done with ' + this.name + ' suite.');
	    }).run();
	}

	return program;
    }

    return {
	bench: F2(bench),
	suite: F2(suite),
	run: F2(run)
    };
})()<commit_msg>catch and report error event from benchmark.js<commit_after>var _user$project$Native_Benchmark = (function () {
    function bench(name, fn) {
	return {
	    name: name,
	    fn: fn
	}
    }

    function suite(name, fnList) {
	var fns = _elm_lang$core$Native_List.toArray(fnList),
	    suite = new Benchmark.Suite(name),
	    i, curr;

	for (i = 0; i < fns.length; i++) {
	    curr = fns[i];
	    suite = suite.add(curr.name, curr.fn);
	}

	return suite;
    }

    function run(suiteList, program) {
	var suites = _elm_lang$core$Native_List.toArray(suiteList),
	    i;

	for (i = 0; i < suites.length; i++) {
	    suites[i].on('start', function () {
		console.log('Starting ' + this.name + ' suite.');
	    }).on('cycle', function (event) {
		console.log(String(event.target));
	    }).on('complete', function () {
		console.log('Done with ' + this.name + ' suite.');
	    }).on('error', function (event) {
                console.log('Error in ' + this.name + ' suite: ', event.target.error);
	    }).run();
	}

	return program;
    }

    return {
	bench: F2(bench),
	suite: F2(suite),
	run: F2(run)
    };
})()
{'fraction_non_alphanumeric': 0.1796233703524867, 'fraction_numerical': 0.004828585224529213, 'mean_word_length': 2.8513011152416357, 'pattern_counts': {'":': 0, '<': 7, '<?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': '7425762', 'n_tokens_mistral': 800, 'n_tokens_neox': 750, 'n_words': 160}