Skip to content

Commit f130c6d

Browse files
committed
bench: refactor to use string interpolation in strided/base/binary-addon-dispatch
--- 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 9687965 commit f130c6d

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

  • lib/node_modules/@stdlib/strided/base/binary-addon-dispatch/benchmark

lib/node_modules/@stdlib/strided/base/binary-addon-dispatch/benchmark/benchmark.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
var bench = require( '@stdlib/bench' );
2626
var isFunction = require( '@stdlib/assert/is-function' );
2727
var Float64Array = require( '@stdlib/array/float64' );
28+
var format = require( '@stdlib/string/format' );
2829
var pkg = require( './../package.json' ).name;
2930
var dispatch = require( './../lib' );
3031

@@ -46,7 +47,7 @@ function fallback2( N, dtypeX, x, strideX, offsetX, dtypeY, y, strideY, offsetY,
4647

4748
// MAIN //
4849

49-
bench( pkg+'::create', function benchmark( b ) {
50+
bench( format( '%s::create', pkg ), function benchmark( b ) {
5051
var f;
5152
var i;
5253

@@ -65,7 +66,7 @@ bench( pkg+'::create', function benchmark( b ) {
6566
b.end();
6667
});
6768

68-
bench( pkg+'::create:ndarray', function benchmark( b ) {
69+
bench( format( '%s::create:ndarray', pkg ), function benchmark( b ) {
6970
var f;
7071
var i;
7172

@@ -84,7 +85,7 @@ bench( pkg+'::create:ndarray', function benchmark( b ) {
8485
b.end();
8586
});
8687

87-
bench( pkg+'::dispatch,addon', function benchmark( b ) {
88+
bench( format( '%s::dispatch,addon', pkg ), function benchmark( b ) {
8889
var f;
8990
var x;
9091
var y;
@@ -112,7 +113,7 @@ bench( pkg+'::dispatch,addon', function benchmark( b ) {
112113
b.end();
113114
});
114115

115-
bench( pkg+'::dispatch,fallback', function benchmark( b ) {
116+
bench( format( '%s::dispatch,fallback', pkg ), function benchmark( b ) {
116117
var f;
117118
var x;
118119
var y;
@@ -140,7 +141,7 @@ bench( pkg+'::dispatch,fallback', function benchmark( b ) {
140141
b.end();
141142
});
142143

143-
bench( pkg+'::dispatch,addon:ndarray', function benchmark( b ) {
144+
bench( format( '%s::dispatch,addon:ndarray', pkg ), function benchmark( b ) {
144145
var f;
145146
var x;
146147
var y;
@@ -168,7 +169,7 @@ bench( pkg+'::dispatch,addon:ndarray', function benchmark( b ) {
168169
b.end();
169170
});
170171

171-
bench( pkg+'::dispatch,fallback:ndarray', function benchmark( b ) {
172+
bench( format( '%s::dispatch,fallback:ndarray', pkg ), function benchmark( b ) {
172173
var f;
173174
var x;
174175
var y;

0 commit comments

Comments
 (0)