EMB is a lightweight library for benchmarking embedded software, written in C++11 and compatible with GCC compilers.
This project is still Work In Progress, so it may have API changes, incomplete functionality, performance issues and bugs. Contact me via Twitter or open an Issue for bugs or feature requests.
EMB is a generic library, built for compatibility with multiple embedded platforms.
As different platforms have different interfaces for timing and I/O, EMB provides multiple customization points, and you need to provide to use it:
- Import the
emb/emb.hppfile into your project. EMB is header-only, so it's that easy! - Provide a reporter class for you system. This class can store the benchmark results, print them to your screen, send via serial port, etc.
- See this example for details on how to do it, as well as how to instantiate the benchmarks.
- Define a timer class for the benchmark. The library is compatible with the
std::chrono's interface.- See this example for a basic implementation
- If you're not using the STL, set the
EMB_DECLVALandEMB_VECTORmacros, with compatible interfaces.EMB_DECLVALshould have similar functionality tostd::declval. Example implementation.EMB_VECTORshould be a class template similar tostd::vector, with apush_backmember function andbeginandenditerator functions for range-basedforloop.
Copyright © 2019 Joel P. C. Filho
This software is released under the Boost Software License - Version 1.0. Refer to the License file for details.