From dfb240c5c01579e330dcf3ea547fecf3d1e9f7bc Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Sun, 19 Apr 2026 14:15:04 -0400 Subject: [PATCH] bench: refactor to use string interpolation in `@stdlib/cli` --- 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/cli/ctor/benchmark/benchmark.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/cli/ctor/benchmark/benchmark.js b/lib/node_modules/@stdlib/cli/ctor/benchmark/benchmark.js index 0edb275f5a3f..68ec850f82fb 100644 --- a/lib/node_modules/@stdlib/cli/ctor/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/cli/ctor/benchmark/benchmark.js @@ -22,13 +22,14 @@ var bench = require( '@stdlib/bench' ); var isArray = require( '@stdlib/assert/is-array' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var CLI = require( './../lib' ); // MAIN // -bench( pkg+'::instantiation', function benchmark( b ) { +bench( format( '%s::instantiation', pkg ), function benchmark( b ) { var cli; var i; b.tic(); @@ -46,7 +47,7 @@ bench( pkg+'::instantiation', function benchmark( b ) { b.end(); }); -bench( pkg+'::instantiation,no_new', function benchmark( b ) { +bench( format( '%s::instantiation,no_new', pkg ), function benchmark( b ) { var ctor; var cli; var i; @@ -68,7 +69,7 @@ bench( pkg+'::instantiation,no_new', function benchmark( b ) { b.end(); }); -bench( pkg+'::instantiation,options', function benchmark( b ) { +bench( format( '%s::instantiation,options', pkg ), function benchmark( b ) { var opts; var cli; var i; @@ -100,7 +101,7 @@ bench( pkg+'::instantiation,options', function benchmark( b ) { b.end(); }); -bench( pkg+':args', function benchmark( b ) { +bench( format( '%s:args', pkg ), function benchmark( b ) { var out; var cli; var i; @@ -122,7 +123,7 @@ bench( pkg+':args', function benchmark( b ) { b.end(); }); -bench( pkg+':flags', function benchmark( b ) { +bench( format( '%s:flags', pkg ), function benchmark( b ) { var out; var cli; var i;