[squeak-dev] The Trunk: Tools-fbs.513.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Dec 31 14:25:39 UTC 2013
Frank Shearar uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-fbs.513.mcz
==================== Summary ====================
Name: Tools-fbs.513
Author: fbs
Time: 31 December 2013, 2:13:25.041 pm
UUID: ea54cdf6-af53-804c-a3e1-d4d4bccfbcad
Ancestors: Tools-fbs.512
* Turn #cpuWatcherEnabled into a pragma preference.
* Update the senders accordingly.
* Accidentally on purpose alphabetise the Tools categories.
=============== Diff against Tools-fbs.512 ===============
Item was changed:
SystemOrganization addCategory: #'Tools-ArchiveViewer'!
SystemOrganization addCategory: #'Tools-Base'!
SystemOrganization addCategory: #'Tools-Browser'!
SystemOrganization addCategory: #'Tools-Changes'!
SystemOrganization addCategory: #'Tools-Debugger'!
SystemOrganization addCategory: #'Tools-Explorer'!
SystemOrganization addCategory: #'Tools-File Contents Browser'!
SystemOrganization addCategory: #'Tools-FileList'!
SystemOrganization addCategory: #'Tools-Inspector'!
SystemOrganization addCategory: #'Tools-Menus'!
- SystemOrganization addCategory: #'Tools-Process Browser'!
SystemOrganization addCategory: #'Tools-MethodFinder'!
+ SystemOrganization addCategory: #'Tools-Process Browser'!
Item was changed:
Model subclass: #CPUWatcher
instanceVariableNames: 'tally watcher threshold'
+ classVariableNames: 'CpuWatcherEnabled CurrentCPUWatcher'
- classVariableNames: 'CurrentCPUWatcher'
poolDictionaries: ''
category: 'Tools-Process Browser'!
!CPUWatcher commentStamp: '<historical>' prior: 0!
CPUWatcher 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.
CPUWatcher can also be used to show cpu percentages for each process
from within the ProcessBrowser.
CPUWatcher startMonitoring. "process period 20 seconds, sample rate 100 msec"
CPUWatcher current monitorProcessPeriod: 10 sampleRate: 20.
CPUWatcher current threshold: 0.5. "change from 80% to 50%"
CPUWatcher stopMonitoring.
!
Item was added:
+ ----- Method: CPUWatcher class>>cpuWatcherEnabled (in category 'preferences') -----
+ cpuWatcherEnabled
+ <preference: 'CPU Watcher enabled' category: #('debug' 'performance') description: 'If true, Squeak will monitor processes for CPU usage. If any uses too much CPU, you will get a notification menu that will allow you to debug, resume or terminate the process.' type: #Boolean>
+ ^ CpuWatcherEnabled ifNil: [false].!
Item was added:
+ ----- Method: CPUWatcher class>>cpuWatcherEnabled: (in category 'preferences') -----
+ cpuWatcherEnabled: aBoolean
+ CpuWatcherEnabled := aBoolean.
+ self monitorPreferenceChanged.!
Item was changed:
----- Method: CPUWatcher class>>monitorPreferenceChanged (in category 'as yet unclassified') -----
monitorPreferenceChanged
+ self cpuWatcherEnabled
- Preferences cpuWatcherEnabled
ifTrue: [ self startMonitoring ]
ifFalse: [ self stopMonitoring ]!
Item was changed:
----- Method: ProcessBrowser>>initialize (in category 'initialize-release') -----
initialize
methodText := ''.
stackListIndex := 0.
searchString := ''.
lastUpdate := 0.
+ startedCPUWatcher := CPUWatcher cpuWatcherEnabled and: [ self startCPUWatcher ].
- startedCPUWatcher := Preferences cpuWatcherEnabled and: [ self startCPUWatcher ].
self updateProcessList; processListIndex: 1.
Browsers add: self!
Item was changed:
+ (PackageInfo named: 'Tools') postscript: 'CPUWatcher cpuWatcherEnabled: Preferences cpuWatcherEnabled.
+ Preferences removePreference: #cpuWatcherEnabled.'!
- (PackageInfo named: 'Tools') postscript: 'SystemBrowser browseWithPrettyPrint: Preferences browseWithPrettyPrint.
- SystemBrowser browseWithDragNDrop: Preferences browseWithDragNDrop.
-
- Preferences removePreference: #browseWithPrettyPrint.
- Preferences removePreference: #browseWithDragNDrop.'!
More information about the Squeak-dev
mailing list
|