Skip to content
Branch: master
Find file History
mjcarroll 0.8.2
Signed-off-by: Michael Carroll <>
Latest commit a9534f8 Nov 13, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples require CMake 3.5 Dec 29, 2016
include/rttest Switch the latency storage to int64_t. Sep 23, 2019
scripts update style to satisfy new flake8 plugins Aug 30, 2017
src Fix typo (#83) Oct 23, 2019
test Fix armhf build warnings (#78) Jun 19, 2019
CHANGELOG.rst 0.8.2 Nov 13, 2019
CMakeLists.txt Remove non-package from ament_target_dependencies() (#79) Jul 25, 2019 add section about DCO to Mar 20, 2019
LICENSE Move rttest into subfolder Dec 7, 2015 Drop obsolete RTLinux (#68) Oct 30, 2018
package.xml c++14 (#50) Dec 13, 2016


rttest is a minimal tool for instrumenting and running tests for synchronous real-time systems. It provides utilities for measuring and plotting jitter, latency, and missed deadlines. It also provides a library with macros for instrumenting code. It is designed with real-time Linux-based systems in mind, such as Preempt RT kernel.

Build instructions

Build from source:

mkdir build
cd build

cmake ..
sudo make install

Alternatively for a local install:

cmake .. -DCMAKE_INSTALL_PREFIX=<build folder>
make install

Build and run the example:

cd examples
mkdir build
cd build
cmake .. (-DCMAKE_INSTALL_PREFIX=<build folder>)

Command line arguments

Passing argc and argv of an instrumented main function to rttest_read_args will enable command line arguments for the instrumented function.

-u Specify the update period. Default units are microseconds. Use the suffix "s" for seconds, "ms" for milliseconds, "us" for microseconds, and "ns" for nanoseconds. Default update period is 1ms.

-m Set maximum stack prefault size for static stack prefaulting. "b" for bytes, "kb" for kilobytes, "mb" for megabytes, "gb" for gigabytes (use with caution). Default stack size is 1024MB.

-i Specify how many iterations to run the real-time loop. Specifying an iteration value less than or equal to 0 will cause rttest to run forever or until interrupted with Ctrl-C. If running forever, rttest will not save a data buffer and writing results to a file will not work. Default value is 1000.

-tp Set the thread priority of all threads launched by the test program. Individual thread priority can be set using the rttest_set_sched_priority command.

-f Specify the name of the file for writing the collected data. Plot this data file using the script provided in scripts.

You can’t perform that action at this time.