hi Philippe, fusion fans,
Attached patch adds a -T <minutes> timeout to testsuite/latency/latency.c
It uses plain-old alarm(), which may not be optimal,
but isnt all bad anyway.
here it is in action:
soekris:/usr/realtime/2.6.10-ak62/testsuite/latency# time ./run latency -T 1
*
*
* Type ^C to stop this application.
*
*
Adeos: Domain RTAI registered.
RTAI: hal/x86 loaded.
Adeos: Domain IShield registered.
RTAI: fusion core v0.6.99 (Crystal Planet) started.
== Sampling period: 100 us
RTH| lat min| lat avg| lat max| overrun
RTD| 28607| 35965| 50006| 1
RTD| 28607| 36370| 58331| 1
RTD| 28607| 37817| 67897| 1
RTD| 28607| 35946| 67897| 1
RTD| 28607| 36606| 67897| 1
RTD| 28607| 36182| 67897| 1
RTD| 28607| 36565| 67897| 1
RTD| 28607| 36771| 67897| 1
RTD| 28607| 36565| 67897| 1
RTD| 28607| 36002| 67897| 1
RTD| 28607| 36486| 75338| 1
RTD| 28607| 36482| 75338| 1
RTD| 28607| 37296| 75338| 1
RTD| 28607| 36160| 75338| 1
RTD| 28607| 36257| 75338| 1
RTD| 28607| 36692| 75338| 1
RTD| 28607| 35995| 75338| 1
RTD| 28607| 38480| 75338| 1
RTD| 28607| 36340| 75338| 1
RTD| 28607| 36403| 75338| 1
RTD| 28607| 36077| 75338| 1
RTH| lat min| lat avg| lat max| overrun
RTD| 28607| 36411| 75338| 1
RTD| 28607| 39035| 75338| 1
RTD| 28607| 35965| 75338| 1
RTD| 28607| 36557| 75338| 1
RTD| 28607| 36201| 75338| 1
RTD| 28607| 36628| 75338| 1
RTD| 28607| 36730| 75338| 1
RTD| 28607| 36595| 75338| 1
RTD| 28607| 35879| 75338| 1
RTD| 28607| 36119| 75338| 1
RTD| 28607| 36467| 75338| 1
RTD| 28607| 37307| 75338| 1
RTD| 28607| 36119| 95028| 1
RTD| 28607| 36149| 95028| 1
RTD| 28607| 36748| 95028| 1
RTD| 28607| 35733| 95028| 1
RTD| 28607| 38682| 95028| 1
RTD| 28607| 36227| 95028| 1
RTD| 28607| 36291| 95028| 1
RTD| 28607| 35935| 95028| 1
RTD| 28607| 36276| 95028| 1
RTH| lat min| lat avg| lat max| overrun
RTD| 28607| 37805| 95028| 1
RTD| 28607| 36047| 95028| 1
RTD| 28607| 36366| 95028| 1
RTD| 28607| 36242| 95028| 1
RTD| 28607| 36437| 95028| 1
RTD| 28607| 36756| 95028| 1
RTD| 28607| 36617| 95028| 1
RTD| 28607| 36137| 95028| 1
RTD| 28607| 36175| 95028| 1
RTD| 28607| 36542| 95028| 1
RTD| 28607| 37472| 95028| 1
RTD| 28607| 36216| 95028| 1
RTD| 28607| 36194| 95028| 1
RTD| 28607| 36681| 95028| 1
RTD| 28607| 35901| 95028| 1
RTD| 28607| 38619| 95028| 1
RTD| 28607| 36332| 95028| 1
Adeos: Domain IShield unregistered.
RTAI: fusion core stopped.
Adeos: Domain RTAI unregistered.
RTAI: hal/x86 unloaded.
real 1m2.165s
user 0m0.341s
sys 0m1.339s
soekris:/usr/realtime/2.6.10-ak62/testsuite/latency#
FWIW, these numbers are with an NFS mounted root (true going forward,
til noted otherwize)
the ^C advice isnt relevant, but its also not in this code, so presents
some 'coupling' issues
I didnt feel like digging thru.
also included is:
-H, another way to trigger histogram.
(so nice it needs 2 options. not really - just testing that my install
was getting there)
a few symbolic constants ( fix blinding # of zeros)
(and same for klatency/latency-module.c)
If this works for you, Ill try to add similar option to klatency, others.
If not, I'll wager its the alarm() call, pls name the better func so I
dont have to read
all the docs.
thanks,
jimc