<commit_before>var fs = require('fs');
var path = require('path');
var utils = require('../utils');

function present(data, cb) {
	switch (data.type) {
		case 'suite-result':
			cb(null, renderSuite(data, 0));
			break;

		case 'test-result':
			cb(null, renderTest(data));
			break;

		default:
			cb(new Error('type of data not supported for presentation.'));
	}
};

function testInfo(test) {
	return test.avg + 'ms ± ' + test.err + '%';
}

function header(title, indent) {
	var s = '##';
	for (var i = 0; i < indent; i++) {
		s += '#';
	}
	s += title;
	return s;
}
<commit_msg>use ops instead of ms in markdown presenter<commit_after>var fs = require('fs');
var path = require('path');
var utils = require('../utils');

function present(data, cb) {
	switch (data.type) {
		case 'suite-result':
			cb(null, renderSuite(data, 0));
			break;

		case 'test-result':
			cb(null, renderTest(data));
			break;

		default:
			cb(new Error('type of data not supported for presentation.'));
	}
};

function testInfo(test) {
	return Math.round(100000 / test.avg) / 100 + 'ops ± ' + test.err + '%';
}

function header(title, indent) {
	var s = '##';
	for (var i = 0; i < indent; i++) {
		s += '#';
	}
	s += title;
	return s;
}

{'fraction_non_alphanumeric': 0.19129720853858784, 'fraction_numerical': 0.010673234811165846, 'mean_word_length': 3.4981549815498156, 'pattern_counts': {'":': 0, '<': 5, '<?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': '728571', 'n_tokens_mistral': 483, 'n_tokens_neox': 440, 'n_words': 125}