performance_test_fixture package from performance_test_fixture repo


Package Summary

Tags No category tags.
Version 0.0.6
License Apache License 2.0
Build type AMENT_CMAKE

Repository Summary

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

Package Description

Test fixture and CMake macro for using osrf_testing_tools_cpp with Google Benchmark

Additional Links

No additional links.


  • Alejandro Hernandez Cordero


  • Scott K Logan


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.


Changelog for package performance_test_fixture

0.0.6 (2020-11-19)

  • Make allocation counter atomic (#13) Even if the benchmark itself isn\'t threaded, the process we\'re testing could be. In any case, this should prevent those shenanigans from messing up the measurement.
  • Add methods for pausing/resuming performance metrics (#10)
    • Add methods for pausing/resuming performance metrics
  • Add benchmarks to evaluate overhead (#11)
    • Add benchmarks to evaluate overhead in performance tests
  • Add namespace performance_test_fixture to .cpp (#9)
  • Contributors: Scott K Logan, brawner

0.0.5 (2020-10-21)

  • Export dependency on benchmark and osrf_testing_tools_cpp (#8)
  • Update maintainers (#7)
  • Contributors: Alejandro Hern

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

No launch files found


No message files found.


No service files found


No plugins found.

Recent questions tagged performance_test_fixture at