summaryrefslogtreecommitdiff
path: root/perf/memory.js
diff options
context:
space:
mode:
authorAlex Early <alexander.early@gmail.com>2018-07-08 16:58:36 -0700
committerGitHub <noreply@github.com>2018-07-08 16:58:36 -0700
commite4751178540a3c6e64598b93977481ec599704d2 (patch)
treedce5731bdb1076971d2e4a0a42fbe0d95c720185 /perf/memory.js
parent6405b109fe60541ff42d7638ac891d321d6a7bb3 (diff)
downloadasync-e4751178540a3c6e64598b93977481ec599704d2.tar.gz
ES6-ify codebase (#1553)
* cancelable foreach * cancelable waterfall * cancellable auto * fix lint * fix tests * cancelable whilst/until/during/forever * fix waterfall test. It WILL get there * docs * use rest params instead of slice * clean up internals * remove property func * clarify uses of createTester * happy path async funtions in asyncify * stop using arguments * DLL to class * moar arrows * fix merge issues * remove forOwn * moar arrows * fix merge mistake * even more arrows, what can stop him * mo more fn.apply(null,...) * remove more spurious uses of apply * update lint config * just when you thought there couldn't possibly be more arrows * use eslint:recommended * even less uses or aguments * get rid of prototype cuteness * fix concat tests * fix more tests
Diffstat (limited to 'perf/memory.js')
-rw-r--r--perf/memory.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/perf/memory.js b/perf/memory.js
index 1edab20..d4a71e9 100644
--- a/perf/memory.js
+++ b/perf/memory.js
@@ -11,14 +11,12 @@ function waterfallTest(cb) {
var functions = [];
for(var i = 0; i < 10000; i++) {
- functions.push(function leaky(next) {
+ functions.push((next) => {
function func1(cb) {return cb(); }
function func2(callback) {
- if (true) {
- callback();
- //return next(); // Should be callback here.
- }
+ callback();
+ //return next(); // Should be callback here.
}
function func3(cb) {return cb(); }
@@ -41,6 +39,6 @@ function reportMemory() {
(+(increase / 1024).toPrecision(3)) + "kB");
}
-waterfallTest(function () {
+waterfallTest(() => {
setTimeout(reportMemory, 0);
});