remove all ^M Dos carraige returns

better late than never, #55
This commit is contained in:
olevole
2024-11-24 17:41:50 +03:00
parent c8c532da72
commit e4c2ee15ae
292 changed files with 58915 additions and 58915 deletions

View File

@@ -1,47 +1,47 @@
import fs from 'fs';
import path from 'path';
import Benchmark from 'benchmark';
var benchmarks = fs.readdirSync('bench').filter(function(testName) {
return testName != 'runner.js' && testName.endsWith('.js')
});
process.on('unhandledRejection', function (e) {
setTimeout(function () {
throw e;
});
});
function runNextBenchmark() {
var nextBenchmark = benchmarks.shift();
if (!nextBenchmark)
return Promise.resolve();
global.suite = new Benchmark.Suite;
console.log('--- ' + nextBenchmark.substr(0, nextBenchmark.length - 3) + ' ---');
return loader.import(path.resolve('bench/' + nextBenchmark))
.then(function() {
return new Promise(function(resolve, reject) {
suite.on('cycle', function(event) {
console.log(event.target.error ? event.target.error : String(event.target));
});
suite.on('complete', function(event) {
console.log('Fastest is ' + this.filter('fastest').map('name') + '\n');
resolve();
});
suite.on('error', reject);
suite.run({ defer: true });
});
})
.then(function() {
return runNextBenchmark();
});
}
runNextBenchmark();
import fs from 'fs';
import path from 'path';
import Benchmark from 'benchmark';
var benchmarks = fs.readdirSync('bench').filter(function(testName) {
return testName != 'runner.js' && testName.endsWith('.js')
});
process.on('unhandledRejection', function (e) {
setTimeout(function () {
throw e;
});
});
function runNextBenchmark() {
var nextBenchmark = benchmarks.shift();
if (!nextBenchmark)
return Promise.resolve();
global.suite = new Benchmark.Suite;
console.log('--- ' + nextBenchmark.substr(0, nextBenchmark.length - 3) + ' ---');
return loader.import(path.resolve('bench/' + nextBenchmark))
.then(function() {
return new Promise(function(resolve, reject) {
suite.on('cycle', function(event) {
console.log(event.target.error ? event.target.error : String(event.target));
});
suite.on('complete', function(event) {
console.log('Fastest is ' + this.filter('fastest').map('name') + '\n');
resolve();
});
suite.on('error', reject);
suite.run({ defer: true });
});
})
.then(function() {
return runNextBenchmark();
});
}
runNextBenchmark();