Skip to content

test: add standalone CoC benchmark and serial evidence runner - #450

Draft
mickeyl wants to merge 11 commits into
h2zero:masterfrom
mickeyl:upstream/l2cap-benchmark
Draft

mickeyl wants to merge 11 commits into
h2zero:masterfrom
mickeyl:upstream/l2cap-benchmark

Conversation

@mickeyl

@mickeyl mickeyl commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Stacked draft: depends on #447, #448 and #449. Keep draft until the prerequisites land, then rebase to remove their commits from this diff. The benchmark implementation is isolated in commit 07207e9; later commits restrict workflow credentials and document a measured resource limit.

Add a standalone ESP-IDF 6.1 benchmark for S3/S31 with ESP and macOS peers. The ESP drives echo, asymmetric request/response, directional streams and duplex independently of its GAP role. A versioned frame parser handles split/coalesced SDUs; streaming uses validated receipts and a final completion fence rather than per-DATA application ACKs.

The serial runner retains complete per-frame evidence, requested versus accepted radio parameters, firmware/config hashes, warmups, reconnect heap samples and failed partial captures. Comparisons keep different link parameters/roles separate. A Foundation-only shared codec and macOS reflector are published separately at mickeyl/core-bluetooth-tool@6124827 . The iPhone peer is not included.

Validation:

  • 17 C++ tests and nine Python evidence/runner tests pass. The underlying lifecycle suite also passes AddressSanitizer/UBSan.
  • Firmware builds for ESP32-S3 and S31 on IDF 6.1.
  • Hardware Apple-Central/ESP-Peripheral checks pass on both boards for small/4-KiB echo, 8→4096 requests, small duplex and reconnects.
  • Bounded 4-KiB echo/request checks pass with the mixed ESP pair in both GAP-role directions.
  • The maximum case is deliberately recorded as a failure: a 4996-byte payload plus framing (one 5000-byte SDU) fails with code 6/ENOMEM in the default pool profile. Error-only instrumentation identifies the error code, not the exact limiting pool. This PR does not claim to fix that resource limit.

No experimental HCI window, MPS alignment, native private-header diagnostics, private captures, generated full SDK configs or machine-specific paths are included. The existing GATT examples/workflows remain separate; new CI compiles the benchmark and checks its evidence codecs. The measured transfer times are host/application metrics, not physical RF throughput or synchronized one-way delays.

Final clean-image HIL audit: ten successful captures / 42 measured runs, 608 echo/request exchanges and 128 streaming DATA frames across 16 completed connections. The maximum-SDU failures are excluded from those totals.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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