--- a/Make.proto Thu Jan 23 03:28:30 1997 +0100
+++ b/Make.proto Thu Jan 23 03:29:24 1997 +0100
@@ -1,4 +1,4 @@
-# $Header: /cvs/stx/stx/libtool/Make.proto,v 1.53 1996-11-01 16:59:26 cg Exp $
+# $Header: /cvs/stx/stx/libtool/Make.proto,v 1.54 1997-01-23 02:28:46 cg Exp $
# -------------- no need to change anything below ----------
@@ -136,7 +136,9 @@
MemUsageV.o: MemUsageV.st $(STCHDR)
OldLauncher.o: OldLauncher.st $(STCHDR)
OCInspView.o: OCInspView.st $(STCHDR)
+SystemStatusMonitor.o: SystemStatusMonitor.st $(STCHDR)
ProcMonitor.o: ProcMonitor.st $(STCHDR)
+SemaphoreMonitor.o: SemaphoreMonitor.st $(STCHDR)
ProjectV.o: ProjectV.st $(STCHDR)
SBrowser.o: SBrowser.st $(STCHDR)
# ENDMAKEDEPEND --- do not remove this line; make depend needs it
--- a/ProcMonitor.st Thu Jan 23 03:28:30 1997 +0100
+++ b/ProcMonitor.st Thu Jan 23 03:29:24 1997 +0100
@@ -10,7 +10,7 @@
hereby transferred.
"
-STXStatusMonitor subclass:#ProcessMonitor
+SystemStatusMonitor subclass:#ProcessMonitor
instanceVariableNames:'processes hideDead runColor suspendedColor waitColor cpuUsages
showDetail'
classVariableNames:''
@@ -599,4 +599,4 @@
!ProcessMonitor class methodsFor:'documentation'!
version
-^ '$Header: /cvs/stx/stx/libtool/Attic/ProcMonitor.st,v 1.44 1997-01-23 02:23:09 cg Exp $'! !
+^ '$Header: /cvs/stx/stx/libtool/Attic/ProcMonitor.st,v 1.45 1997-01-23 02:29:20 cg Exp $'! !
--- a/ProcessMonitor.st Thu Jan 23 03:28:30 1997 +0100
+++ b/ProcessMonitor.st Thu Jan 23 03:29:24 1997 +0100
@@ -10,7 +10,7 @@
hereby transferred.
"
-STXStatusMonitor subclass:#ProcessMonitor
+SystemStatusMonitor subclass:#ProcessMonitor
instanceVariableNames:'processes hideDead runColor suspendedColor waitColor cpuUsages
showDetail'
classVariableNames:''
@@ -599,4 +599,4 @@
!ProcessMonitor class methodsFor:'documentation'!
version
-^ '$Header: /cvs/stx/stx/libtool/ProcessMonitor.st,v 1.44 1997-01-23 02:23:09 cg Exp $'! !
+^ '$Header: /cvs/stx/stx/libtool/ProcessMonitor.st,v 1.45 1997-01-23 02:29:20 cg Exp $'! !
--- a/STXStatusMonitor.st Thu Jan 23 03:28:30 1997 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-SimpleView subclass:#STXStatusMonitor
- instanceVariableNames:'listView listUpdateDelay updateDelay updateBlock listUpdateBlock
- updateProcess'
- classVariableNames:''
- poolDictionaries:''
- category:'Interface-Tools'
-!
-
-
-!STXStatusMonitor class methodsFor:'defaults'!
-
-defaultIcon
- ^ StandardSystemView defaultIcon
-
- "Created: 23.1.1997 / 02:52:25 / cg"
-!
-
-defaultLabel
- ^ 'Status Monitor'
-
- "Created: 23.1.1997 / 02:52:43 / cg"
-! !
-
-!STXStatusMonitor class methodsFor:'startup'!
-
-open
- |top monitor|
-
- top := StandardSystemView new.
- monitor := self origin:0.0@0.0 corner:1.0@1.0 in:top.
- top extent:monitor preferredExtent.
- top label:self defaultLabel.
- top icon:self defaultIcon.
- top open
-
- "
- ProcessMonitor open
- "
-
- "Created: 23.1.1997 / 02:53:42 / cg"
-! !
-
-!STXStatusMonitor methodsFor:'destroying'!
-
-destroy
- updateBlock notNil ifTrue:[
- Processor removeTimedBlock:updateBlock.
- Processor removeTimedBlock:listUpdateBlock.
- ] ifFalse:[
- updateProcess notNil ifTrue:[updateProcess terminate]
- ].
- super destroy
-
- "Created: 23.1.1997 / 02:26:50 / cg"
-! !
-
-!STXStatusMonitor methodsFor:'drawing'!
-
-updateView
- self updateList.
- self updateStatus
-
- "Created: 23.1.1997 / 02:27:05 / cg"
-! !
-
-!STXStatusMonitor methodsFor:'events'!
-
-canHandle:key
- ^ key == #InspectIt
-
- "Created: 23.1.1997 / 02:27:15 / cg"
-!
-
-keyPress:key x:x y:y
- <resource: #keyboard ( #InspectIt ) >
-
- key == #InspectIt ifTrue:[
- ^ self inspectSelection.
- ].
- ^ super keyPress:key x:x y:y
-
- "Modified: 23.1.1997 / 02:27:27 / cg"
- "Created: 23.1.1997 / 02:27:45 / cg"
-! !
-
-!STXStatusMonitor methodsFor:'initialization'!
-
-initialize
- |v|
-
- super initialize.
-
- v := HVScrollableView for:SelectionInListView miniScrollerH:true in:self.
- v origin:0.0@0.0 corner:1.0@1.0.
-
- listView := v scrolledView.
- listView font:font.
- listView menuHolder:self; menuPerformer:self; menuMessage:#statusMenu.
-
- listView multipleSelectOk:true.
- listView delegate:(KeyboardForwarder toView:self).
- listView doubleClickAction:[:line | self doubleClicked].
-
- updateDelay := 0.5.
- listUpdateDelay := 5.
-
- "/ event mode is no longer used;
- "/ this event support may vanish
- Processor isPureEventDriven ifTrue:[
- updateBlock := [self updateStatus].
- listUpdateBlock := [self updateList].
- ].
-
- "
- ProcessMonitor open
- "
-
- "Modified: 23.1.1997 / 03:21:14 / cg"
-!
-
-mapped
- super mapped.
- self updateStatus.
- self updateList.
-
- "Created: 23.1.1997 / 02:30:05 / cg"
-!
-
-realize
- super realize.
-
- self startUpdateProcess.
-
- "Created: 23.1.1997 / 02:30:28 / cg"
-!
-
-reinitialize
- updateProcess := nil.
- super reinitialize.
- self startUpdateProcess.
-
- "Modified: 22.12.1995 / 22:51:14 / cg"
- "Created: 23.1.1997 / 02:30:43 / cg"
-!
-
-startUpdateProcess
- updateBlock notNil ifTrue:[
- Processor addTimedBlock:updateBlock afterSeconds:updateDelay.
- Processor addTimedBlock:listUpdateBlock afterSeconds:listUpdateDelay.
- ] ifFalse:[
- updateProcess := [
- [
- |id cnt|
-
- "
- every 20ms, we look which process runs;
- every half second, the status is updated.
- every 5 seconds, the list of processes is
- built up again
- "
- [true] whileTrue:[
- 1 to:9 do:[:i |
-"/ cpuUsages := IdentityDictionary new.
-"/ 1 to:25 do:[:i |
-"/ (Delay forSeconds:0.02) wait.
-"/ id := Processor interruptedProcess id.
-"/ cnt := cpuUsages at:id ifAbsent:[0].
-"/ cpuUsages at:id put:cnt + 1.
-"/ ].
- Delay waitForSeconds:0.5.
- self updateStatus.
- ].
- Delay waitForSeconds:0.5.
- self updateList.
- ]
- ] valueOnUnwindDo:[
- updateProcess := nil
- ]
- ] forkAt:(Processor userSchedulingPriority + 1).
- updateProcess name:'monitor [' ,
- Processor activeProcess id printString ,
- '] update'.
- "
- raise my own priority
- "
- Processor activeProcess priority:(Processor userSchedulingPriority + 2)
- ].
-
- "Modified: 12.6.1996 / 19:53:13 / cg"
- "Created: 23.1.1997 / 02:30:58 / cg"
-! !
-
-!STXStatusMonitor methodsFor:'queries'!
-
-preferredExtent
- "return my preferred extent"
-
- ^ (font widthOf:self titleLine) + 40 @ 100
-
- "Modified: 23.1.1997 / 02:35:01 / cg"
- "Created: 23.1.1997 / 02:51:24 / cg"
-! !
-
-!STXStatusMonitor class methodsFor:'documentation'!
-
-version
- ^ '$Header: /cvs/stx/stx/libtool/Attic/STXStatusMonitor.st,v 1.1 1997-01-23 02:22:46 cg Exp $'
-! !
--- a/SemaphoreMonitor.st Thu Jan 23 03:28:30 1997 +0100
+++ b/SemaphoreMonitor.st Thu Jan 23 03:29:24 1997 +0100
@@ -12,7 +12,7 @@
-STXStatusMonitor subclass:#SemaphoreMonitor
+SystemStatusMonitor subclass:#SemaphoreMonitor
instanceVariableNames:'semaphores'
classVariableNames:''
poolDictionaries:''
@@ -283,5 +283,5 @@
!SemaphoreMonitor class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/SemaphoreMonitor.st,v 1.1 1997-01-23 02:23:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/SemaphoreMonitor.st,v 1.2 1997-01-23 02:29:24 cg Exp $'
! !