[FIX][GOODIE] PigWatcher-nk (also ProcessBrowser fix)
ned at bike-nomad.com
Thu Mar 22 18:03:18 UTC 2001
Thanks to Bob Arning, you can see the UI process if you have
a newer VM...
I should probably split out the fix for the ProcessBrowser.
"Change Set: PigWatcher-nk
Date: 14 March 2001
Author: Ned Konz
Brought back display of the UI process; this had been removed
in newer VM's by the nil-ing out of the active process suspendedContext
Added automatic starting of PigWatcher when ProcessBrowser
is started, if it's available. This will provide percentage
numbers. If the ProcessBrowser starts the PigWatcher, it
will stop it on exit.
Added PigWatcher menu items to process list menu.
Made PigWatcher update time more accurate.
Added percentage time display to ProcessBrowser. If
a PigWatcher is running, it will use its statistics.
Also greatly reduced auto-update jerkiness in ProcessBrowser
by using garbageCollectMost rather than garbageCollect.
Well, it ignores UI pigs now. You can use the interrupt key for those.
By the way, you can see the current tally using:
Note that the PigWatcher may not catch processes with priorities at or
above 6 (the priority of the IO process).
(note: this also includes a couple of ProcessBrowser fixes:
* suspended processes can now be debugged
* suspended processes can have their priority changed)
PigWatcher implements a simple runaway process monitoring tool
that will suspend a process that is taking up too much of Squeak's
time and allow user interaction. By default it watches for a Process
is taking more than 80% of the time; this threshold can be changed.
PigWatcher startMonitoring. 'process period 20 seconds, sample rate 100
PigWatcher current monitorProcessPeriod: 10 sampleRate: 20.
PigWatcher current threshold: 0.5. 'change from 80% to 50%'
Also (earlier named CPUUsageTally-nk):
Compute CPU usage using a 10-msec sample for (at least) the given number
of seconds, then dump the usage statistics on the Transcript. The UI is
free to continue, meanwhile.
ProcessBrowser tallyCPUUsageFor: 10
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7243 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010322/84795b04/PigWatcher-nk.cs.obj
More information about the Squeak-dev