Repository navigation
Conversation
…uction gate The worklet times every process() call against the quantum it rendered (Date.now, the only clock in its scope: 1 ms steps, so `over budget' is a reading of 3 ms or more at 48 kHz) and posts the count over budget, the slowest call and a histogram by whole milliseconds with each tape, plus whether the clock is too coarse to trust. host.js's synth.quanta() keeps the totals and the last ~2.7 s apart; the jam numbers panel shows both. A tape from an older worklet without the fields is delivered uncounted. bench.mjs plays each piece the way the page does -- samples, default patches for empty channels, seed 1 for pieces with none -- so every shipped piece is timed, and says which channels were timed as silence. --json writes one document: per piece and chord p50/p99/p99.9/max per quantum against the budget, failures as entries, and the build timed (its path and wasm hash) beside the script's commit. --only and --seconds are checked; a run that times nothing fails. dspbench gains -j (JSON), -l and -r (window length and rate), the chord's every window timed (nearest-rank p99 over how many windows), and -s/-h in milliseconds, so play loads compare across window lengths. worklettime.mjs plays pieces on the solo page in a real AudioContext and reports over-budget calls per minute, the slowest call, p99 and the audio clock against the wall clock; a page error fails the piece. instrcount: dspbench on four instruments under cachegrind, against a baseline keyed by compiler, flags, LTO, glibc and Valgrind, failing over x1.10 or under x0.98 so a speedup is recorded with --update in the commit that made it. CI's toolchain is committed; a desktop's counts live in its build. CI pins the linux job to ubuntu-24.04 so an image change is a commit that records new counts, and prints the margin.
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.
The worklet times every process() call against the quantum it rendered
(Date.now, the only clock in its scope: 1 ms steps, so `over budget' is
a reading of 3 ms or more at 48 kHz) and posts the count over budget,
the slowest call and a histogram by whole milliseconds with each tape,
plus whether the clock is too coarse to trust. host.js's synth.quanta()
keeps the totals and the last ~2.7 s apart; the jam numbers panel shows
both. A tape from an older worklet without the fields is delivered
uncounted.
bench.mjs plays each piece the way the page does -- samples, default
patches for empty channels, seed 1 for pieces with none -- so every
shipped piece is timed, and says which channels were timed as silence.
--json writes one document: per piece and chord p50/p99/p99.9/max per
quantum against the budget, failures as entries, and the build timed
(its path and wasm hash) beside the script's commit. --only and
--seconds are checked; a run that times nothing fails.
dspbench gains -j (JSON), -l and -r (window length and rate), the
chord's every window timed (nearest-rank p99 over how many windows),
and -s/-h in milliseconds, so play loads compare across window lengths.
worklettime.mjs plays pieces on the solo page in a real AudioContext
and reports over-budget calls per minute, the slowest call, p99 and the
audio clock against the wall clock; a page error fails the piece.
instrcount: dspbench on four instruments under cachegrind, against a
baseline keyed by compiler, flags, LTO, glibc and Valgrind, failing
over x1.10 or under x0.98 so a speedup is recorded with --update in the
commit that made it. CI's toolchain is committed; a desktop's counts
live in its build. CI pins the linux job to ubuntu-24.04 so an image
change is a commit that records new counts, and prints the margin.