performance_test_fixture repository

Repository Summary

Checkout URI
VCS Type git
VCS Version main
Last Updated 2020-10-08
CI status No Continuous Integration
Package Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)


Name Version
performance_test_fixture 0.0.4



This repository contains the source code for the performance_test_fixture package.

performance_test_fixture provides: 1. A Google Benchmark fixture that leverages memory tools from osrf_testing_tools_cpp to record memory allocation statistics 2. A CMake macro for compiling, linking, and configuring benchmarking runs, as well as automatically skipping the tests on platforms where the osrf_testing_tools_cpp memory tools are not supported


The test fixture can be used just like any other Google Benchmark fixture:

#include <performance_test_fixture/performance_test_fixture.hpp>

using performance_test_fixture::PerformanceTest;

BENCHMARK_F(PerformanceTest, example_test)(benchmark::State & st)

The CMake macro can be used in the same way as the rest of the ament_cmake_test family of macros:

  find_package(performance_test_fixture REQUIRED)
  add_performance_test(example_test test/example_test.cpp)

Because it has a large impact on performance, trace messages coming from the memory tools in osrf_testing_tools_cpp are suppressed by default. To enable memory operation trace logging, set the environment variable PERFORMANCE_TEST_FIXTURE_ENABLE_TRACE=1.


Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:

5. Submission of Contributions. Unless You explicitly state otherwise,
   any Contribution intentionally submitted for inclusion in the Work
   by You to the Licensor shall be under the terms and conditions of
   this License, without any additional terms or conditions.
   Notwithstanding the above, nothing herein shall supersede or modify
   the terms of any separate license agreement you may have executed
   with Licensor regarding such Contributions.

Contributors must sign-off each commit by adding a Signed-off-by: ... line to commit messages to certify that they have the right to submit the code they are contributing to the project according to the Developer Certificate of Origin (DCO).