Skip to content
/ EMB Public

Embedded MicroBenchmarks - An experimental C++11 library for benchmarking code in embedded platforms

License

Notifications You must be signed in to change notification settings

JoelFilho/EMB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Embedded MicroBenchmarks (EMB)

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.

Using the library

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:

  1. Import the emb/emb.hpp file into your project. EMB is header-only, so it's that easy!
  2. 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.
  3. Define a timer class for the benchmark. The library is compatible with the std::chrono's interface.
  4. If you're not using the STL, set the EMB_DECLVAL and EMB_VECTOR macros, with compatible interfaces.
    • EMB_DECLVAL should have similar functionality to std::declval. Example implementation.
    • EMB_VECTOR should be a class template similar to std::vector, with a push_back member function and begin and end iterator functions for range-based for loop.

Copyright / License

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.

About

Embedded MicroBenchmarks - An experimental C++11 library for benchmarking code in embedded platforms

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages