Skip to content

Add CodSpeed performance benchmarks#95

Merged
matt2005 merged 1 commit into
newdevfrom
codspeed-wizard-1778698148239
May 13, 2026
Merged

Add CodSpeed performance benchmarks#95
matt2005 merged 1 commit into
newdevfrom
codspeed-wizard-1778698148239

Conversation

@codspeed-hq
Copy link
Copy Markdown

@codspeed-hq codspeed-hq Bot commented May 13, 2026

Summary

This PR integrates CodSpeed for continuous performance testing of the aasdk library. CodSpeed runs benchmarks on every push and pull request, providing accurate and reproducible performance measurements to catch regressions early.

Changes

Benchmark suite (benchmarks/)

A new benchmark suite built on google_benchmark (via CodSpeed's compatibility layer) covering the core Messenger and Common data modules:

Messenger benchmarks (bench_messenger.cpp):

  • FrameHeader -- parse and serialize 2-byte frame headers, full roundtrip
  • FrameSize -- parse and serialize short (2-byte) and extended (6-byte) frame sizes with endian conversion, full roundtrip
  • MessageId -- encode/decode 2-byte message identifiers with big-endian conversion
  • Message payload insertion -- small (64B), medium (4KB), large (64KB) payloads, buffer-based insertion, and multi-chunk append

Data benchmarks (bench_data.cpp):

  • DataConstBuffer construction from vectors of various sizes and with offsets
  • Data copy operations across sizes from 256B to 1MB, plus multi-append patterns
  • createData allocation and copy
  • dump hex encoding at various buffer sizes
  • Buffer equality and null-check operations

Total: 37 benchmarks.

Build integration (CMakeLists.txt)

  • Added AASDK_BENCHMARK option (default OFF) to optionally build the benchmark executable
  • Benchmarks are built as a separate target (aasdk_benchmarks) and do not affect existing builds or tests

CI workflow (.github/workflows/codspeed.yml)

  • Triggers on push to main/newdev, pull requests, and workflow_dispatch (for CodSpeed backtest analysis)
  • Installs project dependencies, builds benchmarks with CODSPEED_MODE=simulation, and runs them through the CodSpeed action
  • Uses OIDC authentication (tokenless)

README badge

Added a CodSpeed performance badge to Readme.md.

Next steps

  • Once this PR is merged, CodSpeed will begin tracking performance baselines on the default branch
  • Future pull requests will automatically receive performance reports as PR comments
  • Visit the CodSpeed dashboard to view detailed results and flame graphs

@codspeed-hq
Copy link
Copy Markdown
Author

codspeed-hq Bot commented May 13, 2026

Congrats! CodSpeed is installed 🎉

🆕 45 new benchmarks were detected.

You will start to see performance impacts in the reports once the benchmarks are run from your default branch.

Detected benchmarks


ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Open in CodSpeed

@codspeed-hq codspeed-hq Bot marked this pull request as ready for review May 13, 2026 19:01
@matt2005 matt2005 merged commit d338c40 into newdev May 13, 2026
4 checks passed
@matt2005 matt2005 deleted the codspeed-wizard-1778698148239 branch May 13, 2026 19:01
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