Skip to content

Commit 9f70c31

Browse files
authored
bench: refactor to use string interpolation in buffer/to-json
PR-URL: #9580 Ref: #8647 Reviewed-by: Athan Reines <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]>
1 parent 8e05341 commit 9f70c31

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/node_modules/@stdlib/buffer/to-json/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 allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );
26+
var format = require( '@stdlib/string/format' );
2627
var pkg = require( './../package.json' ).name;
2728
var toJSON = require( './../lib' );
2829

@@ -88,7 +89,7 @@ function main() {
8889
for ( i = min; i <= max; i++ ) {
8990
len = pow( 10, i );
9091
f = createBenchmark( len );
91-
bench( pkg+':len='+len, f );
92+
bench( format( '%s:len=%d', pkg, len ), f );
9293
}
9394
}
9495

0 commit comments

Comments
 (0)