K
Kenneth P. Turvey
I'm thinking about working on a project with a friend of mine, but there
are some issues that I'm not sure how to handle. I'm going to break them
into a few different posts since the issues are unrelated to each other
and people may choose to ignore some of them that way.
I understand that Java doesn't allow one to find out how much CPU time was
used by a process. That's fine. This isn't really a good measure for
what we want anyway since it would be vastly different from CPU to CPU.
What we really want is a way to measure how much work was done by a given
CPU on a given job.
What I was thinking would be a good measure was a simple count of the java
byte code instructions executed on a given machine. Is there anyway to
determine how many byte code instructions have been executed by a given
thread since it started?
I'm sure there is a way to do this with the debugging information, but I
don't want to slow down the process too much. Basically I'd like to be
able to start a thread and then wait until it exits and then ask how many
byte code instructions it processed? Any idea how one would do this?
Any other ideas on how to solve this sort of problem?
Thanks.
are some issues that I'm not sure how to handle. I'm going to break them
into a few different posts since the issues are unrelated to each other
and people may choose to ignore some of them that way.
I understand that Java doesn't allow one to find out how much CPU time was
used by a process. That's fine. This isn't really a good measure for
what we want anyway since it would be vastly different from CPU to CPU.
What we really want is a way to measure how much work was done by a given
CPU on a given job.
What I was thinking would be a good measure was a simple count of the java
byte code instructions executed on a given machine. Is there anyway to
determine how many byte code instructions have been executed by a given
thread since it started?
I'm sure there is a way to do this with the debugging information, but I
don't want to slow down the process too much. Basically I'd like to be
able to start a thread and then wait until it exits and then ask how many
byte code instructions it processed? Any idea how one would do this?
Any other ideas on how to solve this sort of problem?
Thanks.