diff options
author | Michaël Zasso <targos@protonmail.com> | 2018-02-14 10:04:22 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2018-02-17 10:15:20 +0100 |
commit | 513d9397202b46fb10da41d88ddb747417f8b870 (patch) | |
tree | 0da623b315289f49f585991d2e42afdb64198473 /benchmark/fs/bench-stat-promise.js | |
parent | 2620358624b6c0f6c7d02dc2e4333eae9e73b3ea (diff) | |
download | android-node-v8-513d9397202b46fb10da41d88ddb747417f8b870.tar.gz android-node-v8-513d9397202b46fb10da41d88ddb747417f8b870.tar.bz2 android-node-v8-513d9397202b46fb10da41d88ddb747417f8b870.zip |
fs: move fs.promises API to fs/promises
PR-URL: https://github.com/nodejs/node/pull/18777
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'benchmark/fs/bench-stat-promise.js')
-rw-r--r-- | benchmark/fs/bench-stat-promise.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/benchmark/fs/bench-stat-promise.js b/benchmark/fs/bench-stat-promise.js index adc0ed4965..b031745572 100644 --- a/benchmark/fs/bench-stat-promise.js +++ b/benchmark/fs/bench-stat-promise.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common'); -const fs = require('fs'); +const fsPromises = require('fs/promises'); const bench = common.createBenchmark(main, { n: [20e4], @@ -10,11 +10,11 @@ const bench = common.createBenchmark(main, { async function run(n, statType) { const arg = statType === 'fstat' ? - await fs.promises.open(__filename, 'r') : __filename; + await fsPromises.open(__filename, 'r') : __filename; let remaining = n; bench.start(); while (remaining-- > 0) - await fs.promises[statType](arg); + await fsPromises[statType](arg); bench.end(n); if (typeof arg.close === 'function') |