From 4e2406b51fba2c7c61043f6011bfd111881973cb Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Sun, 19 Apr 2026 13:25:21 -0400 Subject: [PATCH] bench: refactor to use string interpolation in `@stdlib/function` --- 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 --- --- .../@stdlib/function/ctor/benchmark/benchmark.js | 7 ++++--- .../@stdlib/function/thunk/benchmark/benchmark.js | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/function/ctor/benchmark/benchmark.js b/lib/node_modules/@stdlib/function/ctor/benchmark/benchmark.js index 6a7b56b770bc..1d117a797b33 100644 --- a/lib/node_modules/@stdlib/function/ctor/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/function/ctor/benchmark/benchmark.js @@ -21,13 +21,14 @@ // MODULES // var bench = require( '@stdlib/bench' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var Fcn = require( './../lib' ); // MAIN // -bench( pkg+'::instantiation', function benchmark( b ) { +bench( format( '%s::instantiation', pkg ), function benchmark( b ) { var f; var i; @@ -46,7 +47,7 @@ bench( pkg+'::instantiation', function benchmark( b ) { b.end(); }); -bench( pkg+'::evaluation', function benchmark( b ) { +bench( format( '%s::evaluation', pkg ), function benchmark( b ) { var f; var v; var i; @@ -68,7 +69,7 @@ bench( pkg+'::evaluation', function benchmark( b ) { b.end(); }); -bench( pkg+'::inline', function benchmark( b ) { +bench( format( '%s::inline', pkg ), function benchmark( b ) { var v; var i; diff --git a/lib/node_modules/@stdlib/function/thunk/benchmark/benchmark.js b/lib/node_modules/@stdlib/function/thunk/benchmark/benchmark.js index 54a28e7013c4..2a8a810ab618 100644 --- a/lib/node_modules/@stdlib/function/thunk/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/function/thunk/benchmark/benchmark.js @@ -24,6 +24,7 @@ var bench = require( '@stdlib/bench' ); var isFunction = require( '@stdlib/assert/is-function' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var abs = require( '@stdlib/math/base/special/abs' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var thunk = require( './../lib' ); @@ -49,7 +50,7 @@ bench( pkg, function benchmark( b ) { b.end(); }); -bench( pkg+'::thunk', function benchmark( b ) { +bench( format( '%s::thunk', pkg ), function benchmark( b ) { var fcn; var out; var i;