GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — node/benchmark/module/module-loader-circular.js at main · windwiny/node Expand file tree/ Copy pathmodule-loader-circular.jsMore file actions 33 lines (26 loc) · 794 Bytes / Copy pathmodule-loader-circular.jsFile metadata and controls33 lines (26 loc) · 794 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 'use strict'; const fs = require('fs'); const path = require('path'); const common = require('../common.js'); const tmpdir = require('../../test/common/tmpdir'); const benchmarkDirectory = tmpdir.resolve('benchmark-module-circular'); const bench = common.createBenchmark(main, { n: [1e4], }); function main({ n }) { tmpdir.refresh(); const aDotJS = path.join(benchmarkDirectory, 'a.js'); const bDotJS = path.join(benchmarkDirectory, 'b.js'); fs.mkdirSync(benchmarkDirectory); fs.writeFileSync(aDotJS, 'require("./b.js");'); fs.writeFileSync(bDotJS, 'require("./a.js");'); bench.start(); for (let i = 0; i < n; i++) { require(aDotJS); require(bDotJS); delete require.cache[aDotJS]; delete require.cache[bDotJS]; } bench.end(n); tmpdir.refresh(); } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |