[M3devel] thread testing program in CM3

Mika Nystrom mika at async.caltech.edu
Tue Jan 11 16:53:34 CET 2011


Hi again,

I added the thread "stress tester" to the CM3 repository in the following
location:

m3-libs/m3core/tests/thread

It no longer takes any command-line arguments, and now it prints friendly
diagnostics.

On FreeBSD4 under PM3, I see the following output:

(82)pluto:~/t/threadtest/src>../FreeBSD4/threadtest 
Writing file...done
Creating reader threads...done
Creating forker threads...done
Creating allocator threads...done
running...
laziest thread is 1294760062 seconds behind
laziest thread is 11 seconds behind
laziest thread is 9 seconds behind
laziest thread is 9 seconds behind
laziest thread is 9 seconds behind
laziest thread is 9 seconds behind
laziest thread is 8 seconds behind
laziest thread is 10 seconds behind
laziest thread is 7 seconds behind
laziest thread is 8 seconds behind
(83)pluto:~/t/threadtest/src>m3build -version
m3build: PM3 Version 1.1.15 (Tue Sep  5 17:16:07 EDT 2000)
(84)pluto:~/t/threadtest/src>uname -a
FreeBSD pluto.gcapltd.com 5.5-RELEASE FreeBSD 5.5-RELEASE #0: Mon Sep 24 13:34:44 CDT 2007     root at pluto.gcapltd.com:/usr/src/sys/i386/compile/PLUTO  i386


10 seconds is about right for 100 threads and a 0.1-second time 
quantum (if memory serves, that's what PM3 user threads use?)

    Mika



More information about the M3devel mailing list