Skip to content

Commit 1c7b0b9

Browse files
committed
bench: refactor to use string interpolation in number/uint8/base/identity
This commit refactors JavaScript benchmarks in number/uint8/base/identity to use string interpolation via @stdlib/string/format instead of string concatenation when specifying benchmark names. This improves readability, facilitates easier debugging of malformed benchmark names, and enables future linting of benchmark names. --- 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 e57055b commit 1c7b0b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/node_modules/@stdlib/number/uint8/base/identity/benchmark/benchmark.native.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var bench = require( '@stdlib/bench' );
2525
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
2626
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2727
var tryRequire = require( '@stdlib/utils/try-require' );
28+
var format = require( '@stdlib/string/format' );
2829
var pkg = require( './../package.json' ).name;
2930

3031

@@ -38,7 +39,7 @@ var opts = {
3839

3940
// MAIN //
4041

41-
bench( pkg+'::native', opts, function benchmark( b ) {
42+
bench( format( '%s::native', pkg ), opts, function benchmark( b ) {
4243
var x;
4344
var y;
4445
var i;

0 commit comments

Comments
 (0)