mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
28dcdb9108
Allow zero operations for short buffer benchmark tests. PR-URL: https://github.com/nodejs/node/pull/16296 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
25 lines
590 B
JavaScript
25 lines
590 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
|
|
const runBenchmark = require('../common/benchmark');
|
|
|
|
runBenchmark('buffers',
|
|
[
|
|
'aligned=true',
|
|
'args=1',
|
|
'encoding=utf8',
|
|
'len=2',
|
|
'method=',
|
|
'n=1',
|
|
'noAssert=true',
|
|
'pieces=1',
|
|
'pieceSize=1',
|
|
'search=@',
|
|
'size=1',
|
|
'source=array',
|
|
'type=',
|
|
'withTotalLength=0'
|
|
],
|
|
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });
|