From 31e355bb71ee171366e66d452f4f8d3380fa49a3 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Sun, 19 Apr 2026 14:23:13 -0400 Subject: [PATCH] bench: refactor to use string interpolation in `@stdlib/_tools` --- 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 --- --- .../js/incr/lloc/benchmark/benchmark.js | 3 ++- .../js/incr/program-summary/benchmark/benchmark.js | 3 ++- .../js/incr/sloc/benchmark/benchmark.js | 3 ++- .../js/lloc-file-list/benchmark/benchmark.js | 11 ++++++----- .../js/lloc-glob/benchmark/benchmark.js | 11 ++++++----- .../js/sloc-file-list/benchmark/benchmark.js | 11 ++++++----- .../js/sloc-glob/benchmark/benchmark.js | 11 ++++++----- .../js/summarize-file-list/benchmark/benchmark.js | 11 ++++++----- .../js/summarize-glob/benchmark/benchmark.js | 11 ++++++----- 9 files changed, 42 insertions(+), 33 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/static-analysis/js/incr/lloc/benchmark/benchmark.js b/lib/node_modules/@stdlib/_tools/static-analysis/js/incr/lloc/benchmark/benchmark.js index 3e17c710c31c..1dc5b863f2c6 100644 --- a/lib/node_modules/@stdlib/_tools/static-analysis/js/incr/lloc/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/_tools/static-analysis/js/incr/lloc/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var isPlainObject = require( '@stdlib/assert/is-plain-object' ); var isFunction = require( '@stdlib/assert/is-function' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var incrlloc = require( './../lib' ); @@ -48,7 +49,7 @@ bench( pkg, function benchmark( b ) { b.end(); }); -bench( pkg+'::accumulate', function benchmark( b ) { +bench( format( '%s::accumulate', pkg ), function benchmark( b ) { var values; var acc; var o; diff --git a/lib/node_modules/@stdlib/_tools/static-analysis/js/incr/program-summary/benchmark/benchmark.js b/lib/node_modules/@stdlib/_tools/static-analysis/js/incr/program-summary/benchmark/benchmark.js index 81ce56bd6e04..f0194e957193 100644 --- a/lib/node_modules/@stdlib/_tools/static-analysis/js/incr/program-summary/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/_tools/static-analysis/js/incr/program-summary/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var isPlainObject = require( '@stdlib/assert/is-plain-object' ); var isFunction = require( '@stdlib/assert/is-function' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var incrsummary = require( './../lib' ); @@ -48,7 +49,7 @@ bench( pkg, function benchmark( b ) { b.end(); }); -bench( pkg+'::accumulate', function benchmark( b ) { +bench( format( '%s::accumulate', pkg ), function benchmark( b ) { var values; var acc; var o; diff --git a/lib/node_modules/@stdlib/_tools/static-analysis/js/incr/sloc/benchmark/benchmark.js b/lib/node_modules/@stdlib/_tools/static-analysis/js/incr/sloc/benchmark/benchmark.js index defef6aa22e8..6269caccda14 100644 --- a/lib/node_modules/@stdlib/_tools/static-analysis/js/incr/sloc/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/_tools/static-analysis/js/incr/sloc/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var isPlainObject = require( '@stdlib/assert/is-plain-object' ); var isFunction = require( '@stdlib/assert/is-function' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var incrsloc = require( './../lib' ); @@ -48,7 +49,7 @@ bench( pkg, function benchmark( b ) { b.end(); }); -bench( pkg+'::accumulate', function benchmark( b ) { +bench( format( '%s::accumulate', pkg ), function benchmark( b ) { var values; var acc; var o; diff --git a/lib/node_modules/@stdlib/_tools/static-analysis/js/lloc-file-list/benchmark/benchmark.js b/lib/node_modules/@stdlib/_tools/static-analysis/js/lloc-file-list/benchmark/benchmark.js index 1f31cb79b08e..ec378d06fa8c 100644 --- a/lib/node_modules/@stdlib/_tools/static-analysis/js/lloc-file-list/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/_tools/static-analysis/js/lloc-file-list/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var isPlainObject = require( '@stdlib/assert/is-plain-object' ); var isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives; +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var analyze = require( './../lib' ); @@ -59,7 +60,7 @@ bench( pkg, function benchmark( b ) { } }); -bench( pkg+':cumulative=true', function benchmark( b ) { +bench( format( '%s:cumulative=true', pkg ), function benchmark( b ) { var files; var opts; var i; @@ -93,7 +94,7 @@ bench( pkg+':cumulative=true', function benchmark( b ) { } }); -bench( pkg+':cumulative=false', function benchmark( b ) { +bench( format( '%s:cumulative=false', pkg ), function benchmark( b ) { var files; var opts; var i; @@ -127,7 +128,7 @@ bench( pkg+':cumulative=false', function benchmark( b ) { } }); -bench( pkg+':sync', function benchmark( b ) { +bench( format( '%s:sync', pkg ), function benchmark( b ) { var files; var o; var i; @@ -151,7 +152,7 @@ bench( pkg+':sync', function benchmark( b ) { b.end(); }); -bench( pkg+':sync:cumulative=true', function benchmark( b ) { +bench( format( '%s:sync:cumulative=true', pkg ), function benchmark( b ) { var files; var opts; var o; @@ -179,7 +180,7 @@ bench( pkg+':sync:cumulative=true', function benchmark( b ) { b.end(); }); -bench( pkg+':sync:cumulative=false', function benchmark( b ) { +bench( format( '%s:sync:cumulative=false', pkg ), function benchmark( b ) { var files; var opts; var o; diff --git a/lib/node_modules/@stdlib/_tools/static-analysis/js/lloc-glob/benchmark/benchmark.js b/lib/node_modules/@stdlib/_tools/static-analysis/js/lloc-glob/benchmark/benchmark.js index 85851bbdc5fa..72b5ce1dc0a2 100644 --- a/lib/node_modules/@stdlib/_tools/static-analysis/js/lloc-glob/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/_tools/static-analysis/js/lloc-glob/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var isPlainObject = require( '@stdlib/assert/is-plain-object' ); var isArrayArray = require( '@stdlib/assert/is-array-array' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var analyze = require( './../lib' ); @@ -59,7 +60,7 @@ bench( pkg, function benchmark( b ) { } }); -bench( pkg+':cumulative=true', function benchmark( b ) { +bench( format( '%s:cumulative=true', pkg ), function benchmark( b ) { var opts; var i; @@ -90,7 +91,7 @@ bench( pkg+':cumulative=true', function benchmark( b ) { } }); -bench( pkg+':cumulative=false', function benchmark( b ) { +bench( format( '%s:cumulative=false', pkg ), function benchmark( b ) { var opts; var i; @@ -121,7 +122,7 @@ bench( pkg+':cumulative=false', function benchmark( b ) { } }); -bench( pkg+':sync', function benchmark( b ) { +bench( format( '%s:sync', pkg ), function benchmark( b ) { var opts; var o; var i; @@ -145,7 +146,7 @@ bench( pkg+':sync', function benchmark( b ) { b.end(); }); -bench( pkg+':sync:cumulative=true', function benchmark( b ) { +bench( format( '%s:sync:cumulative=true', pkg ), function benchmark( b ) { var opts; var o; var i; @@ -170,7 +171,7 @@ bench( pkg+':sync:cumulative=true', function benchmark( b ) { b.end(); }); -bench( pkg+':sync:cumulative=false', function benchmark( b ) { +bench( format( '%s:sync:cumulative=false', pkg ), function benchmark( b ) { var opts; var o; var i; diff --git a/lib/node_modules/@stdlib/_tools/static-analysis/js/sloc-file-list/benchmark/benchmark.js b/lib/node_modules/@stdlib/_tools/static-analysis/js/sloc-file-list/benchmark/benchmark.js index 1f31cb79b08e..ec378d06fa8c 100644 --- a/lib/node_modules/@stdlib/_tools/static-analysis/js/sloc-file-list/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/_tools/static-analysis/js/sloc-file-list/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var isPlainObject = require( '@stdlib/assert/is-plain-object' ); var isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives; +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var analyze = require( './../lib' ); @@ -59,7 +60,7 @@ bench( pkg, function benchmark( b ) { } }); -bench( pkg+':cumulative=true', function benchmark( b ) { +bench( format( '%s:cumulative=true', pkg ), function benchmark( b ) { var files; var opts; var i; @@ -93,7 +94,7 @@ bench( pkg+':cumulative=true', function benchmark( b ) { } }); -bench( pkg+':cumulative=false', function benchmark( b ) { +bench( format( '%s:cumulative=false', pkg ), function benchmark( b ) { var files; var opts; var i; @@ -127,7 +128,7 @@ bench( pkg+':cumulative=false', function benchmark( b ) { } }); -bench( pkg+':sync', function benchmark( b ) { +bench( format( '%s:sync', pkg ), function benchmark( b ) { var files; var o; var i; @@ -151,7 +152,7 @@ bench( pkg+':sync', function benchmark( b ) { b.end(); }); -bench( pkg+':sync:cumulative=true', function benchmark( b ) { +bench( format( '%s:sync:cumulative=true', pkg ), function benchmark( b ) { var files; var opts; var o; @@ -179,7 +180,7 @@ bench( pkg+':sync:cumulative=true', function benchmark( b ) { b.end(); }); -bench( pkg+':sync:cumulative=false', function benchmark( b ) { +bench( format( '%s:sync:cumulative=false', pkg ), function benchmark( b ) { var files; var opts; var o; diff --git a/lib/node_modules/@stdlib/_tools/static-analysis/js/sloc-glob/benchmark/benchmark.js b/lib/node_modules/@stdlib/_tools/static-analysis/js/sloc-glob/benchmark/benchmark.js index 85851bbdc5fa..72b5ce1dc0a2 100644 --- a/lib/node_modules/@stdlib/_tools/static-analysis/js/sloc-glob/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/_tools/static-analysis/js/sloc-glob/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var isPlainObject = require( '@stdlib/assert/is-plain-object' ); var isArrayArray = require( '@stdlib/assert/is-array-array' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var analyze = require( './../lib' ); @@ -59,7 +60,7 @@ bench( pkg, function benchmark( b ) { } }); -bench( pkg+':cumulative=true', function benchmark( b ) { +bench( format( '%s:cumulative=true', pkg ), function benchmark( b ) { var opts; var i; @@ -90,7 +91,7 @@ bench( pkg+':cumulative=true', function benchmark( b ) { } }); -bench( pkg+':cumulative=false', function benchmark( b ) { +bench( format( '%s:cumulative=false', pkg ), function benchmark( b ) { var opts; var i; @@ -121,7 +122,7 @@ bench( pkg+':cumulative=false', function benchmark( b ) { } }); -bench( pkg+':sync', function benchmark( b ) { +bench( format( '%s:sync', pkg ), function benchmark( b ) { var opts; var o; var i; @@ -145,7 +146,7 @@ bench( pkg+':sync', function benchmark( b ) { b.end(); }); -bench( pkg+':sync:cumulative=true', function benchmark( b ) { +bench( format( '%s:sync:cumulative=true', pkg ), function benchmark( b ) { var opts; var o; var i; @@ -170,7 +171,7 @@ bench( pkg+':sync:cumulative=true', function benchmark( b ) { b.end(); }); -bench( pkg+':sync:cumulative=false', function benchmark( b ) { +bench( format( '%s:sync:cumulative=false', pkg ), function benchmark( b ) { var opts; var o; var i; diff --git a/lib/node_modules/@stdlib/_tools/static-analysis/js/summarize-file-list/benchmark/benchmark.js b/lib/node_modules/@stdlib/_tools/static-analysis/js/summarize-file-list/benchmark/benchmark.js index ea710eadb521..fb59eba8e31c 100644 --- a/lib/node_modules/@stdlib/_tools/static-analysis/js/summarize-file-list/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/_tools/static-analysis/js/summarize-file-list/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var isPlainObject = require( '@stdlib/assert/is-plain-object' ); var isPlainObjectArray = require( '@stdlib/assert/is-plain-object-array' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var analyze = require( './../lib' ); @@ -59,7 +60,7 @@ bench( pkg, function benchmark( b ) { } }); -bench( pkg+':cumulative=true', function benchmark( b ) { +bench( format( '%s:cumulative=true', pkg ), function benchmark( b ) { var files; var opts; var i; @@ -93,7 +94,7 @@ bench( pkg+':cumulative=true', function benchmark( b ) { } }); -bench( pkg+':cumulative=false', function benchmark( b ) { +bench( format( '%s:cumulative=false', pkg ), function benchmark( b ) { var files; var opts; var i; @@ -127,7 +128,7 @@ bench( pkg+':cumulative=false', function benchmark( b ) { } }); -bench( pkg+':sync', function benchmark( b ) { +bench( format( '%s:sync', pkg ), function benchmark( b ) { var files; var o; var i; @@ -151,7 +152,7 @@ bench( pkg+':sync', function benchmark( b ) { b.end(); }); -bench( pkg+':sync:cumulative=true', function benchmark( b ) { +bench( format( '%s:sync:cumulative=true', pkg ), function benchmark( b ) { var files; var opts; var o; @@ -179,7 +180,7 @@ bench( pkg+':sync:cumulative=true', function benchmark( b ) { b.end(); }); -bench( pkg+':sync:cumulative=false', function benchmark( b ) { +bench( format( '%s:sync:cumulative=false', pkg ), function benchmark( b ) { var files; var opts; var o; diff --git a/lib/node_modules/@stdlib/_tools/static-analysis/js/summarize-glob/benchmark/benchmark.js b/lib/node_modules/@stdlib/_tools/static-analysis/js/summarize-glob/benchmark/benchmark.js index 00bc56b6c212..2fee4b533d98 100644 --- a/lib/node_modules/@stdlib/_tools/static-analysis/js/summarize-glob/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/_tools/static-analysis/js/summarize-glob/benchmark/benchmark.js @@ -23,6 +23,7 @@ var bench = require( '@stdlib/bench' ); var isPlainObject = require( '@stdlib/assert/is-plain-object' ); var isPlainObjectArray = require( '@stdlib/assert/is-plain-object-array' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var analyze = require( './../lib' ); @@ -59,7 +60,7 @@ bench( pkg, function benchmark( b ) { } }); -bench( pkg+':cumulative=true', function benchmark( b ) { +bench( format( '%s:cumulative=true', pkg ), function benchmark( b ) { var opts; var i; @@ -90,7 +91,7 @@ bench( pkg+':cumulative=true', function benchmark( b ) { } }); -bench( pkg+':cumulative=false', function benchmark( b ) { +bench( format( '%s:cumulative=false', pkg ), function benchmark( b ) { var opts; var i; @@ -121,7 +122,7 @@ bench( pkg+':cumulative=false', function benchmark( b ) { } }); -bench( pkg+':sync', function benchmark( b ) { +bench( format( '%s:sync', pkg ), function benchmark( b ) { var opts; var o; var i; @@ -145,7 +146,7 @@ bench( pkg+':sync', function benchmark( b ) { b.end(); }); -bench( pkg+':sync:cumulative=true', function benchmark( b ) { +bench( format( '%s:sync:cumulative=true', pkg ), function benchmark( b ) { var opts; var o; var i; @@ -170,7 +171,7 @@ bench( pkg+':sync:cumulative=true', function benchmark( b ) { b.end(); }); -bench( pkg+':sync:cumulative=false', function benchmark( b ) { +bench( format( '%s:sync:cumulative=false', pkg ), function benchmark( b ) { var opts; var o; var i;