Hello,
Does anyone have suggestions on how to benchmark hard real-time
performance? I'm not looking for anything fancy; I just want to check that
the process I've created is actually running in hard real-time.
I've put together some code to print out the time between each invocation
of updateHook(): https://gist.github.com/20c8e10588e0f7f737a0
..but it uses sys/time.h. It claims that its jitter---running at 1 kHz in
user space---is 20 to 30 microseconds max, but since it's a system call,
I'm not sure if I should trust those numbers.
Soo-Hyun Yoo
Dynamic Robotics Lab
Oregon State University
Suggestions on an accurate way to benchmark hard real-time perfo
On Sat, Dec 17, 2011 at 03:05:03AM +0100, Soo-Hyun Yoo wrote:
> Hello,
>
> Does anyone have suggestions on how to benchmark hard real-time performance?
> I'm not looking for anything fancy; I just want to check that the process I've
> created is actually running in hard real-time.
>
> I've put together some code to print out the time between each invocation of
> updateHook(): https://gist.github.com/20c8e10588e0f7f737a0
>
> ..but it uses sys/time.h. It claims that its jitter---running at 1 kHz in user
> space---is 20 to 30 microseconds max, but since it's a system call, I'm not
> sure if I should trust those numbers.
The numbers are probably OK, but you should clock_gettime() with
CLOCK_MONOTONIC instead of gettimeofday. The system call is not a
problem.
For portability you could also use the RTT timeservice:
http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
You can also run cyclictest(8) and compare both results.
Best regards
Markus
Suggestions on an accurate way to benchmark hard real-time perfo
On Mon, Dec 19, 2011 at 12:53 AM, Markus Klotzbuecher <
markus [dot] klotzbuecher [..] ...> wrote:
> On Sat, Dec 17, 2011 at 03:05:03AM +0100, Soo-Hyun Yoo wrote:
> > Hello,
> >
> > Does anyone have suggestions on how to benchmark hard real-time
> performance?
> > I'm not looking for anything fancy; I just want to check that the
> process I've
> > created is actually running in hard real-time.
> >
> > I've put together some code to print out the time between each
> invocation of
> > updateHook(): https://gist.github.com/20c8e10588e0f7f737a0
> >
> > ..but it uses sys/time.h. It claims that its jitter---running at 1 kHz
> in user
> > space---is 20 to 30 microseconds max, but since it's a system call, I'm
> not
> > sure if I should trust those numbers.
>
> The numbers are probably OK, but you should clock_gettime() with
> CLOCK_MONOTONIC instead of gettimeofday. The system call is not a
> problem.
>
> For portability you could also use the RTT timeservice:
>
>
> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/classRTT_1_...
>
> You can also run cyclictest(8) and compare both results.
>
> Best regards
> Markus
>
Thanks for the suggestions! I'll post back with any example code and
results when I get around to implementing this.
Soo-Hyun