<commit_before>var fluxyPerf = require('../perf/fluxy-perf');
var fullfluxPerf = require('../perf/fullflux-perf');
var refluxPerf = require('../perf/reflux-perf');

var results = [];

function run(f){
    var r = f.start();
    results.push(r);
    console.log(r.name + ': ' + r.ops  + ' op/s, avg. ' + r.avg + ' ms per operation');
}

run(fluxyPerf);
run(fullfluxPerf);
run(refluxPerf);




<commit_msg>Performance Statistics<commit_after>var fluxyPerf = require('../perf/fluxy-perf');
var fullfluxPerf = require('../perf/fullflux-perf');
var refluxPerf = require('../perf/reflux-perf');

var results = [];

function run(f){
    var r = f.start();
    results.push(r);
    console.log(r.name + ': ' + r.ops  + ' op/s, avg. ' + r.avg + ' ms per operation');
}

function analyseResults(){

    console.log('\nResult:\n-------------------------------\n');

    results.sort( function(a,b){
        return b.ops - a.ops;
    });
    var fastest = results[0];

    for(var i = 0; i < results.length; ++i){
        var r = results[i];
        var percent = (r.ops / fastest.ops) * 100.00;

        console.log( i+1 + '. ' + r.name + ': ' + r.ops + ' op/s (' + (r.ops - fastest.ops).toFixed(2) + ' op/s) - ' + percent.toFixed(2) + '%' );
    }
}

run(fluxyPerf);
run(fullfluxPerf);
run(refluxPerf);

analyseResults();




{'fraction_non_alphanumeric': 0.22965779467680608, 'fraction_numerical': 0.0076045627376425855, 'mean_word_length': 2.6353591160220993, 'pattern_counts': {'":': 0, '<': 4, '<?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': '6913883', 'n_tokens_mistral': 520, 'n_tokens_neox': 482, 'n_words': 92}