File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -271,6 +271,7 @@ SoilTest >> testMetricsWithRecordCache [
271
271
self assert: metrics metaRecordCacheMaximumSize equals: 1000 .
272
272
self assert: metrics metaRecordCacheSize equals: 3 .
273
273
self assert: metrics objectRecordCacheSize equals: 1 .
274
+ self assert: metrics objectRecordCacheTotalWeight equals: 1 .
274
275
275
276
276
277
]
Original file line number Diff line number Diff line change @@ -82,6 +82,15 @@ SoilMetrics >> metaRecordCacheSize [
82
82
ifFalse: [ 0 ]
83
83
]
84
84
85
+ { #category : #metrics }
86
+ SoilMetrics >> metaRecordCacheTotalWeight [
87
+ | metaSegment |
88
+ metaSegment := soil objectRepository metaSegment.
89
+ ^ (metaSegment isKindOf: SoilCachedObjectSegment )
90
+ ifTrue: [ metaSegment cache totalWeight ]
91
+ ifFalse: [ 0 ]
92
+ ]
93
+
85
94
{ #category : #metrics }
86
95
SoilMetrics >> metaRecordsRead [
87
96
^ metaRecordsRead
@@ -135,6 +144,14 @@ SoilMetrics >> objectRecordCacheSize [
135
144
136
145
]
137
146
147
+ { #category : #metrics }
148
+ SoilMetrics >> objectRecordCacheTotalWeight [
149
+ ^ self cachedSegments
150
+ ifNotEmpty: [:segments | (segments collect: [ :each | each cache totalWeight ]) average ]
151
+ ifEmpty: 0
152
+
153
+ ]
154
+
138
155
{ #category : #metrics }
139
156
SoilMetrics >> objectRecordsRead [
140
157
^ objectRecordsRead
You can’t perform that action at this time.
0 commit comments