Add CodSpeed performance benchmarks#95
Merged
Merged
Conversation
Author
Congrats! CodSpeed is installed 🎉
You will start to see performance impacts in the reports once the benchmarks are run from your default branch.
|
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.
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 roundtripFrameSize-- parse and serialize short (2-byte) and extended (6-byte) frame sizes with endian conversion, full roundtripMessageId-- encode/decode 2-byte message identifiers with big-endian conversionMessagepayload insertion -- small (64B), medium (4KB), large (64KB) payloads, buffer-based insertion, and multi-chunk appendData benchmarks (
bench_data.cpp):DataConstBufferconstruction from vectors of various sizes and with offsetsDatacopy operations across sizes from 256B to 1MB, plus multi-append patternscreateDataallocation and copydumphex encoding at various buffer sizesTotal: 37 benchmarks.
Build integration (
CMakeLists.txt)AASDK_BENCHMARKoption (defaultOFF) to optionally build the benchmark executableaasdk_benchmarks) and do not affect existing builds or testsCI workflow (
.github/workflows/codspeed.yml)main/newdev, pull requests, andworkflow_dispatch(for CodSpeed backtest analysis)CODSPEED_MODE=simulation, and runs them through the CodSpeed actionREADME badge
Added a CodSpeed performance badge to
Readme.md.Next steps