Skip to content

Commit

Permalink
Renamed IllAllocationStatisticsProfiler to IllAllocationRateProfiler …
Browse files Browse the repository at this point in the history
…and also the test class.
  • Loading branch information
jordanmontt committed Oct 23, 2023
1 parent 94a41cc commit 6810ca1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Class {
#name : 'IllAllocationStatisticsProfilerTest',
#name : 'IllAllocationRateProfilerTest',
#superclass : 'IllAbstractProfilerTest',
#category : 'IllimaniProfiler-Tests-Finalization-Profiler',
#package : 'IllimaniProfiler-Tests',
#tag : 'Finalization-Profiler'
}

{ #category : 'running' }
IllAllocationStatisticsProfilerTest >> profilerClass [
IllAllocationRateProfilerTest >> profilerClass [

^ IllAllocationStatisticsProfiler
^ IllAllocationRateProfiler
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Class {
#name : 'IllAllocationStatisticsProfiler',
#name : 'IllAllocationRateProfiler',
#superclass : 'IllAbstractProfiler',
#instVars : [
'allocationsRegistry',
Expand All @@ -11,20 +11,20 @@ Class {
}

{ #category : 'initialization' }
IllAllocationStatisticsProfiler >> initialize [
IllAllocationRateProfiler >> initialize [

super initialize.
allocationsRegistry := OrderedCollection new: 3000000
]

{ #category : 'profiling' }
IllAllocationStatisticsProfiler >> internalRegisterAllocation: anObject [
IllAllocationRateProfiler >> internalRegisterAllocation: anObject [

allocationsRegistry add: anObject class -> anObject sizeInMemory
]

{ #category : 'accessing' }
IllAllocationStatisticsProfiler >> objectAllocations [
IllAllocationRateProfiler >> objectAllocations [

objectAllocations ifNil: [
objectAllocations := allocationsRegistry collect: [ :assoc |
Expand All @@ -36,19 +36,19 @@ IllAllocationStatisticsProfiler >> objectAllocations [
]

{ #category : 'accessing - statistics' }
IllAllocationStatisticsProfiler >> stats [
IllAllocationRateProfiler >> stats [

^ self
]

{ #category : 'accessing' }
IllAllocationStatisticsProfiler >> totalAllocatedMemory [
IllAllocationRateProfiler >> totalAllocatedMemory [

^ self objectAllocations sum: #sizeInBytes
]

{ #category : 'accessing' }
IllAllocationStatisticsProfiler >> totalAllocatedObjects [
IllAllocationRateProfiler >> totalAllocatedObjects [

^ allocationsRegistry size
]

0 comments on commit 6810ca1

Please sign in to comment.