J
Joe
Hi,
I am wondering if there is any way of determining how much processing
time a thread uses. I know of the simple method of taking the system
time before the thread starts, starting the thread and when it
completes execution, getting the system time at that point but that is
not reliable for my application.
The threads I am using run as low priority so as not to interfere with
the system as they can run for a long time (hrs to days), so for
example if it has been running for 5 hours it might have only used
about 2hrs of the processor according to Task Manager in Windows 2000.
Is there any way of determining this time programmatically in Java, or
a more accurate way of how much time the thread has spent executing in
the processor?
Also, related to this, I would also like to determine the processor
speed in Java if possible, so combining the time it takes a thread to
execute on the particular processor, I can determine a fair benchmark
between different computers?
Any help much appreciated,
Joe
I am wondering if there is any way of determining how much processing
time a thread uses. I know of the simple method of taking the system
time before the thread starts, starting the thread and when it
completes execution, getting the system time at that point but that is
not reliable for my application.
The threads I am using run as low priority so as not to interfere with
the system as they can run for a long time (hrs to days), so for
example if it has been running for 5 hours it might have only used
about 2hrs of the processor according to Task Manager in Windows 2000.
Is there any way of determining this time programmatically in Java, or
a more accurate way of how much time the thread has spent executing in
the processor?
Also, related to this, I would also like to determine the processor
speed in Java if possible, so combining the time it takes a thread to
execute on the particular processor, I can determine a fair benchmark
between different computers?
Any help much appreciated,
Joe