Skip to content

feat: update WASM runtime probe - #21

Open
antsukanova wants to merge 19 commits into
mainfrom
antsukan/bnr-runtime-probe-wasm
Open

feat: update WASM runtime probe #21
antsukanova wants to merge 19 commits into
mainfrom
antsukan/bnr-runtime-probe-wasm

Conversation

@antsukanova

Copy link
Copy Markdown
Contributor

Description

Replace the WASM-to-JS timing ratio with a WASM-only runtime benchmark.

The previous probe could report slow WASM when JavaScript was slow but WASM was healthy. The new worker measures WASM add, divide, and square-root operations and compares their timings to identify fast and slow WASM runtimes.

This change:

  • Runs the benchmark in a Web Worker
  • Uses five trials and median timings
  • Returns OK, SLOW, UNCERTAIN, UNKNOWN, or DISABLED
  • Returns one reason for unknown or uncertain results
  • Groups useful numeric data under measurements
  • Distinguishes worker startup, timeout, runtime, benchmark, and measurement failures
  • Improves naming and documentation around benchmark calculations
  • Updates unit coverage for probe

Related work:

This change implements...

  • A new feature
  • A bug fix
  • Other (please specify):

Is this a breaking change?

  • Yes
  • No

Test evidence

I certify that...

  • All relevant unit and integration tests have passed and/or have been updated according to this change.

Generative AI (GAI) Usage Disclosure

  • Cisco approved GAI tool/IDE was used for coding

  • No GAI

  • Manual Draft with GAI Refinement

  • GAI Draft with Manual Customization

  • GAI Generated Code

Additional GAI Usage Details:

Cursor was used to review naming, simplify API documentation, refactor result handling, and extend unit-test coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant