bench: add benchmark to utils/async/series-waterfall#13046
Draft
Planeshifter wants to merge 1 commit into
Draft
Conversation
Adds a missing `benchmark/benchmark.js` (present in 32/33 sibling packages — 97% conformance) and the corresponding `directories.benchmark` entry in `package.json` (also 32/33). Modeled after the sibling pattern used in `function-sequence` and `parallel`, exercising the waterfall through a fixed-length sequence of async callbacks.
Contributor
Coverage ReportNo coverage information available. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the missing
benchmark/benchmark.jsand matchingdirectories.benchmarkpackage.jsonentry to@stdlib/utils/async/series-waterfall, bringing it in line with the structural convention of its sibling packages.Namespace summary
@stdlib/utils/asyncREADME.mdpresence,package.jsonpresence + top-level key set,lib/index.js+lib/main.jspresence,test/test.jspresence,docs/repl.txt+docs/types/{index.d.ts,test.ts}presence,examples/index.jspresence,benchmark/benchmark.jspresence (32/33 — 97%),directories.benchmarkkey inpackage.json(32/33 — 97%),@exampleJSDoc tag inlib/main.js(33/33 — 100%).lib/factory.js/lib/limit.js/lib/validate.js/test/test.factory.js/test/test.validate.js/benchmark/benchmark.factory.jspresence — these split along an "iterator-with-options" (~22) vs "control-flow primitive" (~10) archetype boundary, with neither side reaching 75%. Per-packagepublicSignatureandvalidationProloguewere excluded for the same reason.Per outlier package
@stdlib/utils/async/series-waterfall@stdlib/utils/async/series-waterfallwas the only package in the 33-member@stdlib/utils/asyncnamespace missingbenchmark/benchmark.jsand the correspondingdirectories.benchmarkentry inpackage.json. The added benchmark drives the waterfall through a three-function async sequence (foo->bar->fun), matching the convention established byfunction-sequence/benchmark/benchmark.jsandparallel/benchmark/benchmark.js. Purely additive fixture and metadata; no lib, public API, or test changes.Validation
Checked:
package.jsonshape, README section headings).lib/main.js,lib/validate.js, andlib/index.js(validation-prologue predicates,format()-vs-plainErrorconstruction,@exampletag counts, top-level export shape).Deliberately excluded:
## See AlsoREADME section is missing fromparallelandseries-waterfall; dropped because it is generator-populated and not safe to edit manually.composeandfunction-sequencethrow new Error('insufficient arguments...')calls — intentional, sinceformat()adds nothing without a placeholder.parallel/lib/validate.jslack of aseriesoption — semantically required (parallel cannot be serial), not drift.push()split inside thenext()callbacks of several control-flow primitives — no 75% majority either way.Related Issues
No.
Questions
No.
Other
The added benchmark was syntax-checked with
node --check; an end-to-endnode benchmark/benchmark.jsrun was not possible in the development environment because the localnode_modules/(debug, transitively required by@stdlib/bench) is not installed, but the file is a near-mechanical adaptation of the established sibling pattern.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code as part of a cross-package drift-detection routine: the
@stdlib/utils/asyncnamespace was scanned for structural and semantic features, the majority pattern (>=75% conformance) was computed per feature, outliers were flagged, and the surviving correction was applied to bringseries-waterfallinto line with its 32 siblings. The proposed fix was validated by three independent agents (one cross-reference, one structural-review, one semantic-review) before being committed.Generated by Claude Code