Skip to content

Commit 096d18b

Browse files
Benchmark: set 'NODE_ENV=production' before running the benchmarks (#2434)
Motivated by #2428
1 parent 95aa338 commit 096d18b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

resources/benchmark-fork.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ if (require.main === module) {
3535

3636
function sampleModule(modulePath) {
3737
return new Promise((resolve, reject) => {
38-
const env = { BENCHMARK_MODULE_PATH: modulePath };
38+
const env = {
39+
NODE_ENV: 'production',
40+
BENCHMARK_MODULE_PATH: modulePath,
41+
};
3942
const child = cp.fork(__filename, { env });
4043
let message;
4144
let error;

0 commit comments

Comments
 (0)