[GOODIE] PigWatcher-nk (with added percentage display in ProcessBrowser)

Ned Konz ned at bike-nomad.com
Fri Mar 9 05:21:35 UTC 2001


from preamble:

"Change Set:		PigWatcher-nk
Date:			8 March 2001
Author:			Ned Konz

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:

	ProcessBrowser dumpTallyOnTranscript: PigWatcher current tally

Note that this 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
that
is taking more than 80% of the time; this threshold can be changed.

	PigWatcher startMonitoring.	'process period 20 seconds, sample rate 100
msec'
	PigWatcher current monitorProcessPeriod: 10 sampleRate: 20.
	PigWatcher current threshold: 0.5.	'change from 80% to 50%'
	PigWatcher stopMonitoring.

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...
Name: PigWatcher-nk.cs.gz
Type: application/octet-stream
Size: 4552 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010308/74a881a2/PigWatcher-nk.cs.obj


More information about the Squeak-dev mailing list