Skip to content

CPU: per-mode decode benchmarks + live/max demod effort (Pi-deployable)#101

Merged
kevinelliott merged 1 commit into
masterfrom
cpu-bench
Jun 12, 2026
Merged

CPU: per-mode decode benchmarks + live/max demod effort (Pi-deployable)#101
kevinelliott merged 1 commit into
masterfrom
cpu-bench

Conversation

@kevinelliott

Copy link
Copy Markdown
Contributor

What

Task #38: bench/cpu.sh measures ×-realtime decode speed per mode — and the first measurement caught the demod campaign's hidden trade: AIS at 3.0× and ADS-B at 2.2× realtime on an M-series Mac, unusable on Pi-class hardware.

mode effort before after recall
ais full 3.0× 8.6× 52 frames (+1 from the hunt change)
adsb max (file default) 2.2×* 5.3× 161 unique
adsb live (SDR default) 16.6× 156 unique (97 %)
vdl2 / hfdl full 85× / 283× unchanged

*first measurement startup-dominated; methodology corrected (looped capture).

AIS: cached GMSK waveform tables, traceback matrix replacing O(n²) path clones, stride-2 template hunt with low-metric span skipping.
ADS-B: --demod-effort live|max — per-command defaults (file decode = max, SDR = live), flag overrides.

Pi math (5–8× slower): live ADS-B ≈ 2–3×, AIS ≈ 1.4× — both deployable.

Testing

Workspace green; all four bench gates green; coh_unit 202/202 bit-true after the traceback rewrite.

🤖 Generated with Claude Code

bench/cpu.sh measures x-realtime per mode. First measurement caught
the demod-campaign trade: AIS 3.0x and ADS-B 2.2x realtime on an
M-series Mac - unusable on Pi-class hardware.

Fixes:
- AIS: cached GMSK waveform tables (were re-integrated per burst),
  trellis traceback matrix instead of O(n^2) path clones, stride-2
  template hunt with low-metric span skipping. 3.0x -> 8.6x, and the
  hunt change GAINED a frame (51 -> 52).
- ADS-B: --demod-effort live|max. Max (file-decode default) scans all
  eight 1/8-sample grids: 5.3x, 161 unique. Live (SDR default) scans
  one half-sample grid: 16.6x, 156 unique (97%). Per-command defaults,
  flag overrides.

All four bench gates green (bench uses max).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kevinelliott, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 41 minutes and 26 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 88dcf9ff-c514-4da4-9ac4-86a4aee23361

📥 Commits

Reviewing files that changed from the base of the PR and between 3cc2301 and b334f24.

📒 Files selected for processing (10)
  • bench/README.md
  • bench/cpu.sh
  • crates/xng-mode-adsb/src/demod.rs
  • crates/xng-mode-adsb/src/lib.rs
  • crates/xng-mode-ais/src/coherent.rs
  • docs/notes/BENCHMARKS.md
  • src/commands/scan.rs
  • src/commands/survey.rs
  • src/main.rs
  • src/runtime.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cpu-bench

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 and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b334f24a1a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main.rs
include: tune.filter_labels.clone(),
exclude: tune.exclude_labels.clone(),
},
demod_effort: tune.demod_effort.unwrap_or(runtime::DemodEffort::Live),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Default TUI file replay to max effort

When xng tui --file ... is used without --demod-effort, this unconditionally selects Live, so ADS-B recordings opened in the TUI use the reduced timing-grid scan and can miss frames that xng decode finds by default. This contradicts the new option help/default policy for file decoding and only affects TUI sessions backed by a file; choose the default based on whether file is Some before falling back to Live for actual SDR use.

Useful? React with 👍 / 👎.

@kevinelliott kevinelliott merged commit 481d7d6 into master Jun 12, 2026
3 checks passed
@kevinelliott kevinelliott deleted the cpu-bench branch June 12, 2026 18:34
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