Skip to content

Commit 374b631

Browse files
bench: refactor to use string interpolation in buffer/alloc-unsafe
PR-URL: #9531 Ref: #8647 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent ee1b451 commit 374b631

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/node_modules/@stdlib/buffer/alloc-unsafe/benchmark/benchmark.length.js

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

@@ -86,7 +87,7 @@ function main() {
8687
for ( i = min; i <= max; i++ ) {
8788
len = pow( 10, i );
8889
f = createBenchmark( len );
89-
bench( pkg+':len='+len, f );
90+
bench( format( '%s:len=%d', pkg, len ), f );
9091
}
9192
}
9293

0 commit comments

Comments
 (0)