From 6810ca1c35f1b0b9f613a6e6df605fd80a6b98a1 Mon Sep 17 00:00:00 2001 From: jordanmontt Date: Mon, 23 Oct 2023 11:16:11 +0200 Subject: [PATCH] Renamed IllAllocationStatisticsProfiler to IllAllocationRateProfiler and also the test class. --- ...s.st => IllAllocationRateProfilerTest.class.st} | 6 +++--- ...class.st => IllAllocationRateProfiler.class.st} | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) rename src/IllimaniProfiler-Tests/{IllAllocationStatisticsProfilerTest.class.st => IllAllocationRateProfilerTest.class.st} (60%) rename src/IllimaniProfiler/{IllAllocationStatisticsProfiler.class.st => IllAllocationRateProfiler.class.st} (69%) diff --git a/src/IllimaniProfiler-Tests/IllAllocationStatisticsProfilerTest.class.st b/src/IllimaniProfiler-Tests/IllAllocationRateProfilerTest.class.st similarity index 60% rename from src/IllimaniProfiler-Tests/IllAllocationStatisticsProfilerTest.class.st rename to src/IllimaniProfiler-Tests/IllAllocationRateProfilerTest.class.st index 5343d5d..bf8f20a 100644 --- a/src/IllimaniProfiler-Tests/IllAllocationStatisticsProfilerTest.class.st +++ b/src/IllimaniProfiler-Tests/IllAllocationRateProfilerTest.class.st @@ -1,5 +1,5 @@ Class { - #name : 'IllAllocationStatisticsProfilerTest', + #name : 'IllAllocationRateProfilerTest', #superclass : 'IllAbstractProfilerTest', #category : 'IllimaniProfiler-Tests-Finalization-Profiler', #package : 'IllimaniProfiler-Tests', @@ -7,7 +7,7 @@ Class { } { #category : 'running' } -IllAllocationStatisticsProfilerTest >> profilerClass [ +IllAllocationRateProfilerTest >> profilerClass [ - ^ IllAllocationStatisticsProfiler + ^ IllAllocationRateProfiler ] diff --git a/src/IllimaniProfiler/IllAllocationStatisticsProfiler.class.st b/src/IllimaniProfiler/IllAllocationRateProfiler.class.st similarity index 69% rename from src/IllimaniProfiler/IllAllocationStatisticsProfiler.class.st rename to src/IllimaniProfiler/IllAllocationRateProfiler.class.st index 47add28..fd0ce0b 100644 --- a/src/IllimaniProfiler/IllAllocationStatisticsProfiler.class.st +++ b/src/IllimaniProfiler/IllAllocationRateProfiler.class.st @@ -1,5 +1,5 @@ Class { - #name : 'IllAllocationStatisticsProfiler', + #name : 'IllAllocationRateProfiler', #superclass : 'IllAbstractProfiler', #instVars : [ 'allocationsRegistry', @@ -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 | @@ -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 ]