| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3eea43a commit 0376b5b
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,11 +3,14 @@ | |||
| 3 | 3 | ||
| 4 | 4 | const path = require('path'); | |
| 5 | 5 | const common = require('../common.js'); | |
| 6 | - const filename = path.resolve(process.env.NODE_TMPDIR || __dirname, | ||
| 7 | - `.removeme-benchmark-garbage-${process.pid}`); | ||
| 8 | 6 | const fs = require('fs'); | |
| 9 | 7 | const assert = require('assert'); | |
| 10 | 8 | ||
| 9 | + const tmpdir = require('../../test/common/tmpdir'); | ||
| 10 | + tmpdir.refresh(); | ||
| 11 | + const filename = path.resolve(tmpdir.path, | ||
| 12 | + `.removeme-benchmark-garbage-${process.pid}`); | ||
| 13 | + | ||
| 11 | 14 | let encodingType, encoding, size, filesize; | |
| 12 | 15 | ||
| 13 | 16 | const bench = common.createBenchmark(main, { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,11 +5,14 @@ | |||
| 5 | 5 | ||
| 6 | 6 | const path = require('path'); | |
| 7 | 7 | const common = require('../common.js'); | |
| 8 | - const filename = path.resolve(process.env.NODE_TMPDIR || __dirname, | ||
| 9 | - `.removeme-benchmark-garbage-${process.pid}`); | ||
| 10 | 8 | const fs = require('fs'); | |
| 11 | 9 | const assert = require('assert'); | |
| 12 | 10 | ||
| 11 | + const tmpdir = require('../../test/common/tmpdir'); | ||
| 12 | + tmpdir.refresh(); | ||
| 13 | + const filename = path.resolve(tmpdir.path, | ||
| 14 | + `.removeme-benchmark-garbage-${process.pid}`); | ||
| 15 | + | ||
| 13 | 16 | const bench = common.createBenchmark(main, { | |
| 14 | 17 | dur: [5], | |
| 15 | 18 | len: [1024, 16 * 1024 * 1024], | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,10 +3,13 @@ | |||
| 3 | 3 | ||
| 4 | 4 | const path = require('path'); | |
| 5 | 5 | const common = require('../common.js'); | |
| 6 | - const filename = path.resolve(process.env.NODE_TMPDIR || __dirname, | ||
| 7 | - `.removeme-benchmark-garbage-${process.pid}`); | ||
| 8 | 6 | const fs = require('fs'); | |
| 9 | 7 | ||
| 8 | + const tmpdir = require('../../test/common/tmpdir'); | ||
| 9 | + tmpdir.refresh(); | ||
| 10 | + const filename = path.resolve(tmpdir.path, | ||
| 11 | + `.removeme-benchmark-garbage-${process.pid}`); | ||
| 12 | + | ||
| 10 | 13 | const bench = common.createBenchmark(main, { | |
| 11 | 14 | dur: [5], | |
| 12 | 15 | encodingType: ['buf', 'asc', 'utf'], | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,4 +19,4 @@ runBenchmark('fs', [ | |||
| 19 | 19 | 'filesize=1024', | |
| 20 | 20 | 'dir=.github', | |
| 21 | 21 | 'withFileTypes=false' | |
| 22 | - ], { NODE_TMPDIR: tmpdir.path, NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); | ||
| 22 | + ], { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments