File tree 3 files changed +74
-2
lines changed
src/GToolkit-Pharo-System
3 files changed +74
-2
lines changed Original file line number Diff line number Diff line change
1
+ Class {
2
+ #name : #GtVmMemoryConfigurationBytesMemoryThreshold ,
3
+ #superclass : #GtVmMemoryConfigurationDataThreshold ,
4
+ #category : #' GToolkit-Pharo-System'
5
+ }
6
+
7
+ { #category : #comparison }
8
+ GtVmMemoryConfigurationBytesMemoryThreshold >> = anObject [
9
+ ]
10
+
11
+ { #category : #printing }
12
+ GtVmMemoryConfigurationBytesMemoryThreshold >> description [
13
+ ^ String streamContents: [ :aStream |
14
+ self descriptionOn: aStream ]
15
+ ]
16
+
17
+ { #category : #printing }
18
+ GtVmMemoryConfigurationBytesMemoryThreshold >> descriptionOn: aStream [
19
+ thresholdValue
20
+ ifNotNil: [aStream nextPutAll: thresholdValue humanReadableIsqByteSize]
21
+ ]
22
+
23
+ { #category : #printing }
24
+ GtVmMemoryConfigurationBytesMemoryThreshold >> printOn: aStream [
25
+ super printOn: aStream.
26
+
27
+ aStream parenthesize: [
28
+ self descriptionOn: aStream ]
29
+ ]
Original file line number Diff line number Diff line change
1
+ Class {
2
+ #name : #GtVmMemoryConfigurationDataThreshold ,
3
+ #superclass : #Object ,
4
+ #instVars : [
5
+ ' thresholdValue'
6
+ ],
7
+ #category : #' GToolkit-Pharo-System'
8
+ }
9
+
10
+ { #category : #comparison }
11
+ GtVmMemoryConfigurationDataThreshold >> = anObject [
12
+ self == anObject ifTrue: [ ^ true ].
13
+ self class = anObject class ifFalse: [ ^ false ].
14
+
15
+ ^ self thresholdValue = anObject thresholdValue
16
+ ]
17
+
18
+ { #category : #accessing }
19
+ GtVmMemoryConfigurationDataThreshold >> thresholdValue [
20
+ ^ thresholdValue
21
+ ]
22
+
23
+ { #category : #accessing }
24
+ GtVmMemoryConfigurationDataThreshold >> thresholdValue: anObject [
25
+ thresholdValue := anObject
26
+ ]
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ GtVmMemoryConfigurationInstaller >> applyWithId: aMemoryConfigurationId during:
80
80
GtVmMemoryConfigurationInstaller >> dataThresholdAt: aString above: aValue [
81
81
^ self
82
82
dataThresholdAt: aString
83
- ifPresent: [ :each | aValue > each ]
83
+ ifPresent: [ :each | aValue > each thresholdValue ]
84
84
ifAbsent: [ false ]
85
85
]
86
86
@@ -118,6 +118,20 @@ GtVmMemoryConfigurationInstaller >> gtConfigurationBuildersFor: aView [
118
118
view: #gtConfigurationsBuildersByIdFor:
119
119
]
120
120
121
+ { #category : #views }
122
+ GtVmMemoryConfigurationInstaller >> gtDataThresholdsFor: aView [
123
+ < gtView>
124
+
125
+ ^ aView columnedList
126
+ title: ' Data Thresholds' ;
127
+ priority: 1 ;
128
+ items: [ dataThresholds associations ];
129
+ column: ' Key' text: [ :assoc | assoc key ];
130
+ column: ' Value' text: [ :assoc | assoc value description ] weight: 3 ;
131
+ send: [ :assoc | assoc value ].
132
+
133
+ ]
134
+
121
135
{ #category : #initialization }
122
136
GtVmMemoryConfigurationInstaller >> initialize [
123
137
super initialize.
@@ -126,7 +140,10 @@ GtVmMemoryConfigurationInstaller >> initialize [
126
140
configurationsRegistry := GtVmMemoryConfigurationRegistry new .
127
141
dataThresholds := Dictionary new .
128
142
129
- self dataThresholdAt: #epiceaMethodSourcesSize put: 5 * 1024 * 1024 " 5 MiB"
143
+ self
144
+ dataThresholdAt: #epiceaMethodSourcesSize
145
+ put: (GtVmMemoryConfigurationBytesMemoryThreshold new
146
+ thresholdValue: 5 * 1024 * 1024 ) " 5 MiB"
130
147
]
131
148
132
149
{ #category : #testing }
You can’t perform that action at this time.