Message-ID: <3A361DF7.584E043F@computer.org>
Date: Tue, 12 Dec 2000 12:45:43 +0000
From: Garry Smith
Hi Alan,
Thank you for your reply.
I think you will find that select() uses the interval timer, so therefore select() will be subject to the same granularity problems (10ms minimum time) as I mentioned in my earlier posting.
It sounds like this is going to be a real pain :-(
The interval timer, this must be a software component in the Linux kernel, yes? The actual clock harware should be nonosecs! surely... We are talking of chips that have MHz/GHz...
I have been given a microsecond clock .dll for Windows (which I have yet to use). I do not yet know if that lives up to the microsecond requirement either.
When I have a moment I will do a comparison between the Linux (as discussed here)/Windows methods to see what happens. It will be interesting to see if Windows can manage a finer granularity.
What do other people do when they need to test (accurately) the performance of their code on Linux? I am particularily interested in timing the period that method calls take to complete
regards Garry
Alan Lenton
----- Original Message ----- From: "Jesse Marlin"
To: "Garry Smith" Cc: Sent: Monday, December 11, 2000 3:04 PM Subject: [SLE] microsecond clock timer Hi all,
I am about to start doing some performance testing on a software
Garry Smith writes: project
that I am involved with. I would like to use my version of SuSE Linux 7.0 Professional as one of the test platforms.
How can I get Linux to provide microsecond granularity when I make calls to the system clock? In otherwords, I need a microsecond clock on Linux to get accurate performance measurements of my software?
You can use select, like so:
struct timeval tv;
tv.tv_sec = 0; tv.tv_usec = 1000;
/* Sleep for a while */ select (0, NULL, NULL, NULL, &tv);
------ snip -----
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
participants (1)
-
Garry.Smith@computer.org