On Sat, 15 May 2010, Mariano Martinez Peck wrote:

Hi folks. This is why I like writing in books/wikis, because I always learn
:)
Now I writing in the book about the Interrupt Key and I come up with this
guy I was not even aware of: CPUWatcher. It seemss very cool and useful.
However, I am using it wrong, or there is too much dust on it.  I want to
ask if I am using it well before debugging and try to make it work.

As the class comment says, I tried to do this:

CPUWatcher startMonitoring.    "process period 20 seconds, sample rate 100
msec"

And then I evaluated in a workspace:

[ true ] whileTrue: [ 1+1 ]

It should stop that process when it is using 80% of the CPU, but it doesn't.
The process is never stop and the image freeze. I then tried:

CPUWatcher startMonitoring.    "process period 20 seconds, sample rate 100
msec"
CPUWatcher current threshold: 0.3.    "change from 80% to 30%"

I have the same results...

any hints?

Your code doesn't have any message sends when executed, so it can't be interrupted. Btw, you can turn CPUWatcher on from the Process Browser and see the CPU usage of processes.


Levente


Cheers

Mariano


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to