Skip to content

Commit 01e7efb

Browse files
authored
bench: refactor to use string interpolation in buffer/from-string
PR-URL: #9579 Ref: #8647 Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
1 parent f6e662c commit 01e7efb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/node_modules/@stdlib/buffer/from-string/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 string2buffer = require( './../lib' );
2829

@@ -93,7 +94,7 @@ function main() {
9394
for ( i = min; i <= max; i++ ) {
9495
len = pow( 10, i );
9596
f = createBenchmark( len );
96-
bench( pkg+':len='+len, f );
97+
bench( format( '%s:len=%d', pkg, len ), f );
9798
}
9899
}
99100

0 commit comments

Comments
 (0)