Skip to content

Commit e2b5ae8

Browse files
committed
bench: use string interpolation in stats/max-by
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 0c31eaf commit e2b5ae8

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)