Skip to content

Commit

Permalink
benchmark: fix fork detection
Browse files Browse the repository at this point in the history
PR-URL: #43601
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
ShogunPanda authored and targos committed Jul 12, 2022
1 parent dabccef commit d90a6f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmark/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ function formatResult(data) {
}

function sendResult(data) {
if (process.send) {
if (process.send && Object.hasOwn(process.env, 'NODE_RUN_BENCHMARK_FN')) {
// If forked, report by process send
process.send(data, () => {
// If, for any reason, the process is unable to self close within
Expand Down

0 comments on commit d90a6f9

Please sign in to comment.