RtPerfMonitorEX Sample

This sample measures RTSS CPU usage, system response timer (SRTM) latencies, and wRTOS HAL clock tick intervals and latencies. It monitors RTSS context switch timestamps to calculate CPU usage statistics including minimum, maximum, and average CPU time spent in RTSS context. It also tracks and reports latency histograms for system response times and HAL clock ticks, helping analyze real-time system responsiveness and interrupt latency. The sample supports SMP platforms, adapting to processor counts and clock timer periods. Timers are used for periodic sampling and printing of statistics.

Source Files

File Description
MonitorEx.c Source file.
MonitorEx.asm Assembly component.

Building the Sample

Build the sample in an RTSS configuration: RTSSDebug or RTSSRelease.

Running the Sample

Run the sample using RtssRun. See Usage below.

Usage

RtssRun RtPerfMonitorEx.rtss [/?] [/h] [/u] [/r] [/t] seconds_to_sample seconds_to_flush

/h

Display histogram output alongside summary statistics.

/u

Measure RTSS CPU usage.

/r

Measure system response timer latencies.

/t

Measure wRTOS HAL clock ticks and latencies from HAL ISR to IST.

/?

Show help message.

seconds_to_sample

Total duration to sample in seconds (default is 15).

seconds_to_flush

Interval between output flushes in seconds (default is 5).

If no parameters are provided, the sample runs with this command:

/h /u 15 5

Expected Results

Unexpected Results

The program cannot be run, which typically occurs when another MonitorEx instance is active.

APIs Referenced

RTAPI

Windows-Supported