Upsilon-VsCode/Client/node_modules/flatmap-stream/perf-test.js

13 lines
327 B
JavaScript
Raw Normal View History

2019-02-17 17:07:28 +00:00
var es = require('event-stream');
var fms = require('./index.js');
var data = require('./test/data.js');
var startTime = Date.now();
es.readArray(data)
.pipe(fms(function(data, callback) {
callback(null, data);
}))
.pipe(es.writeArray(function(err, out) {
var endTime = Date.now();
console.log(endTime - startTime);
}));