node icon indicating copy to clipboard operation
node copied to clipboard

benchmark: add benchmark groups

Open Mesteery opened this issue 4 years ago • 3 comments

Add the byGroup option to have benchmark parameter grouping. The environment variable NODE_RUN_BENCHMARK_GROUPS allows to benchmark only certain groups: NODE_RUN_BENCHMARK_GROUPS=groupA,groupB.

Fixes: https://github.com/nodejs/node/issues/26425

Mesteery avatar Jul 06 '21 11:07 Mesteery

I think we should be adding something to the output (preferably in a "backwards-compatible" fashion) to indicate which group a particular configuration result is for, in order to remedy the issue noted in a previous PR that attempted to add similar functionality.

mscdex avatar Jul 06 '21 12:07 mscdex

I think we should be adding something to the output (preferably in a "backwards-compatible" fashion) to indicate which group a particular configuration result is for, in order to remedy the issue noted in a previous PR that attempted to add similar functionality.

That's what this line does: https://github.com/nodejs/node/blob/07cee144b75d7425ece95be07debc7d6ac4c4c66/benchmark/common.js#L35

buffers\buffer-from-by-group.js group="groupA" n=2048 len=10 source="array": 2,591.525584798374
buffers\buffer-from-by-group.js group="groupA" n=2048 len=2048 source="array": 114.49576417665251
buffers\buffer-from-by-group.js group="groupA" n=2048 len=10 source="arraybuffer": 6,035.5383579386635
buffers\buffer-from-by-group.js group="groupA" n=2048 len=2048 source="arraybuffer": 7,932.364200868532
buffers\buffer-from-by-group.js group="groupA" n=2048 len=10 source="arraybuffer-middle": 7,275.558953342637
buffers\buffer-from-by-group.js group="groupA" n=2048 len=2048 source="arraybuffer-middle": 7,601.415615193181
buffers\buffer-from-by-group.js group="groupA" n=2048 len=10 source="buffer": 4,794.999714360369
buffers\buffer-from-by-group.js group="groupA" n=2048 len=2048 source="buffer": 285.891492173511
buffers\buffer-from-by-group.js group="groupA" n=2048 len=10 source="uint8array": 4,773.4621608726675
buffers\buffer-from-by-group.js group="groupA" n=2048 len=2048 source="uint8array": 288.5734902132302
buffers\buffer-from-by-group.js group="groupA" n=2048 len=10 source="string": 1,127.4664705344785
buffers\buffer-from-by-group.js group="groupA" n=2048 len=2048 source="string": 150.8948858783378
buffers\buffer-from-by-group.js group="groupA" n=2048 len=10 source="string-utf8": 969.7732383214418
buffers\buffer-from-by-group.js group="groupA" n=2048 len=2048 source="string-utf8": 152.72480591794306
buffers\buffer-from-by-group.js group="groupA" n=2048 len=10 source="string-base64": 811.0613882780957
buffers\buffer-from-by-group.js group="groupA" n=2048 len=2048 source="string-base64": 93.07144996598143
buffers\buffer-from-by-group.js group="groupA" n=2048 len=10 source="object": 4,568.509008640237
buffers\buffer-from-by-group.js group="groupA" n=2048 len=2048 source="object": 2,715.449648894217
buffers\buffer-from-by-group.js group="groupB" n=2048 len=2048 source="buffer": 221.14045045726675
buffers\buffer-from-by-group.js group="groupB" n=2048 len=2048 source="string": 140.29462281811206

Mesteery avatar Jul 06 '21 12:07 Mesteery

@nodejs/benchmarking

targos avatar Jul 07 '21 10:07 targos