Skip to content

Commit a83b4cc

Browse files
whizzelstdlib-bot
andauthored
bench: refactor to use string interpolation in buffer/ctor
PR-URL: #9552 Ref: #8647 Reviewed-by: Athan Reines <kgryte@gmail.com> Co-authored-by: stdlib-bot <noreply@stdlib.io>
1 parent 02b72ef commit a83b4cc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/node_modules/@stdlib/buffer/ctor/benchmark/benchmark.length.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ var bench = require( '@stdlib/bench' );
2424
var pow = require( '@stdlib/math/base/special/pow' );
2525
var isBuffer = require( '@stdlib/assert/is-buffer' );
2626
var isFunction = require( '@stdlib/assert/is-function' );
27+
var format = require( '@stdlib/string/format' );
2728
var pkg = require( './../package.json' ).name;
2829
var ctor = require( './../lib' );
2930

@@ -98,7 +99,7 @@ function main() {
9899
for ( i = min; i <= max; i++ ) {
99100
len = pow( 10, i );
100101
f = createBenchmark( len );
101-
bench( pkg+':len='+len, f );
102+
bench( format( '%s:len=%d', pkg, len ), f );
102103
}
103104
}
104105

0 commit comments

Comments
 (0)