From 96581805ccc5c2b1f53e5c3a8884617161a4db9b Mon Sep 17 00:00:00 2001 From: opbot_xd Date: Wed, 10 Dec 2025 16:27:51 +0530 Subject: [PATCH] bench: refactor to use string interpolation in complex/float64/base/add This commit refactors JavaScript benchmarks in complex/float64/base/add 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: na - 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 --- --- .../complex/float64/base/add/benchmark/benchmark.assign.js | 3 ++- .../complex/float64/base/add/benchmark/benchmark.native.js | 3 ++- .../complex/float64/base/add/benchmark/benchmark.strided.js | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/complex/float64/base/add/benchmark/benchmark.assign.js b/lib/node_modules/@stdlib/complex/float64/base/add/benchmark/benchmark.assign.js index e131d893f035..5ae19e4c7abf 100644 --- a/lib/node_modules/@stdlib/complex/float64/base/add/benchmark/benchmark.assign.js +++ b/lib/node_modules/@stdlib/complex/float64/base/add/benchmark/benchmark.assign.js @@ -24,6 +24,7 @@ var bench = require( '@stdlib/bench' ); var uniform = require( '@stdlib/random/array/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var Float64Array = require( '@stdlib/array/float64' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var add = require( './../lib' ); @@ -37,7 +38,7 @@ var options = { // MAIN // -bench( pkg+':assign', function benchmark( b ) { +bench( format( '%s:assign', pkg ), function benchmark( b ) { var out; var re; var im; diff --git a/lib/node_modules/@stdlib/complex/float64/base/add/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/complex/float64/base/add/benchmark/benchmark.native.js index 07bdd2eced70..df9d22ec4274 100644 --- a/lib/node_modules/@stdlib/complex/float64/base/add/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/complex/float64/base/add/benchmark/benchmark.native.js @@ -28,6 +28,7 @@ var Complex128 = require( '@stdlib/complex/float64/ctor' ); var real = require( '@stdlib/complex/float64/real' ); var imag = require( '@stdlib/complex/float64/imag' ); var tryRequire = require( '@stdlib/utils/try-require' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; @@ -41,7 +42,7 @@ var opts = { // MAIN // -bench( pkg+'::native', opts, function benchmark( b ) { +bench( format( '%s::native', pkg ), opts, function benchmark( b ) { var values; var out; var z; diff --git a/lib/node_modules/@stdlib/complex/float64/base/add/benchmark/benchmark.strided.js b/lib/node_modules/@stdlib/complex/float64/base/add/benchmark/benchmark.strided.js index 50eb56c8e98c..dcdc24db359a 100644 --- a/lib/node_modules/@stdlib/complex/float64/base/add/benchmark/benchmark.strided.js +++ b/lib/node_modules/@stdlib/complex/float64/base/add/benchmark/benchmark.strided.js @@ -24,6 +24,7 @@ var bench = require( '@stdlib/bench' ); var uniform = require( '@stdlib/random/array/uniform' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var Float64Array = require( '@stdlib/array/float64' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var add = require( './../lib' ); @@ -37,7 +38,7 @@ var options = { // MAIN // -bench( pkg+':strided', function benchmark( b ) { +bench( format( '%s:strided', pkg ), function benchmark( b ) { var out; var z1; var z2;