Skip to content

Commit 6ca11b2

Browse files
committed
bench: refactor to use string interpolation in wasm/memory
--- 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 7f83de8 commit 6ca11b2

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

lib/node_modules/@stdlib/wasm/memory/benchmark/benchmark.grow.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@
2222

2323
var bench = require( '@stdlib/bench' );
2424
var isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;
25+
var format = require( '@stdlib/string/format' );
2526
var pkg = require( './../package.json' ).name;
2627
var Memory = require( './../lib' );
2728

2829

2930
// MAIN //
3031

31-
bench( pkg+':grow', function benchmark( b ) {
32+
bench( format( '%s:grow', pkg ), function benchmark( b ) {
3233
var opts;
3334
var mem;
3435
var v;

lib/node_modules/@stdlib/wasm/memory/benchmark/benchmark.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench' );
24+
var format = require( '@stdlib/string/format' );
2425
var pkg = require( './../package.json' ).name;
2526
var Memory = require( './../lib' );
2627

2728

2829
// MAIN //
2930

30-
bench( pkg+'::constructor', function benchmark( b ) {
31+
bench( format( '%s::constructor', pkg ), function benchmark( b ) {
3132
var mem;
3233
var i;
3334

lib/node_modules/@stdlib/wasm/memory/benchmark/benchmark.properties.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@
2222

2323
var bench = require( '@stdlib/bench' );
2424
var isArrayBuffer = require( '@stdlib/assert/is-arraybuffer' );
25+
var format = require( '@stdlib/string/format' );
2526
var pkg = require( './../package.json' ).name;
2627
var Memory = require( './../lib' );
2728

2829

2930
// MAIN //
3031

31-
bench( pkg+'::get:buffer', function benchmark( b ) {
32+
bench( format( '%s::get:buffer', pkg ), function benchmark( b ) {
3233
var mem;
3334
var v;
3435
var i;

lib/node_modules/@stdlib/wasm/memory/benchmark/benchmark.size.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench' );
24+
var format = require( '@stdlib/string/format' );
2425
var pkg = require( './../package.json' ).name;
2526
var Memory = require( './../lib' );
2627

@@ -84,7 +85,7 @@ function main() {
8485

8586
for ( i = min; i <= max; i++ ) {
8687
f = createBenchmark( i );
87-
bench( pkg+':initial='+i, f );
88+
bench( format( '%s:initial=%d', pkg, i), f );
8889
}
8990
}
9091

0 commit comments

Comments
 (0)