Skip to content

Commit 1370ff7

Browse files
authored
bench: use string interpolation in stats/max-by
PR-URL: #10703 Ref: #8647 Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
1 parent 8145443 commit 1370ff7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/node_modules/@stdlib/stats/max-by/benchmark/benchmark.assign.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 isnan = require( '@stdlib/math/base/assert/is-nan' );
2525
var pow = require( '@stdlib/math/base/special/pow' );
2626
var uniform = require( '@stdlib/random/array/uniform' );
27+
var format = require( '@stdlib/string/format' );
2728
var zeros = require( '@stdlib/array/zeros' );
2829
var ndarray = require( '@stdlib/ndarray/base/ctor' );
2930
var pkg = require( './../package.json' ).name;
@@ -115,7 +116,7 @@ function main() {
115116
for ( i = min; i <= max; i++ ) {
116117
len = pow( 10, i );
117118
f = createBenchmark( len );
118-
bench( pkg+':assign:dtype='+options.dtype+',len='+len, f );
119+
bench( format( '%s:assign:dtype=%s,len=%d', pkg, options.dtype, len ), f );
119120
}
120121
}
121122

lib/node_modules/@stdlib/stats/max-by/benchmark/benchmark.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 isnan = require( '@stdlib/math/base/assert/is-nan' );
2525
var pow = require( '@stdlib/math/base/special/pow' );
2626
var uniform = require( '@stdlib/random/array/uniform' );
27+
var format = require( '@stdlib/string/format' );
2728
var ndarray = require( '@stdlib/ndarray/base/ctor' );
2829
var pkg = require( './../package.json' ).name;
2930
var maxBy = require( './../lib' );
@@ -109,7 +110,7 @@ function main() {
109110
for ( i = min; i <= max; i++ ) {
110111
len = pow( 10, i );
111112
f = createBenchmark( len );
112-
bench( pkg+':dtype='+options.dtype+',len='+len, f );
113+
bench( format( '%s:dtype=%s,len=%d', pkg, options.dtype, len ), f );
113114
}
114115
}
115116

0 commit comments

Comments
 (0)