From cec9fabb31a7b44f503b933bc184864bf9fdb890 Mon Sep 17 00:00:00 2001 From: jordanmontt Date: Tue, 24 Sep 2024 20:23:29 +0200 Subject: [PATCH] Increased time limit for test --- .../IllMemoryProfilerTest.class.st | 2 ++ src/IllimaniProfiler/IllAllocationSiteBin.class.st | 7 +++++++ src/IllimaniProfiler/IllAnalyzer.class.st | 9 +++++++++ src/IllimaniProfiler/IllPredictator.class.st | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/src/IllimaniProfiler-Tests/IllMemoryProfilerTest.class.st b/src/IllimaniProfiler-Tests/IllMemoryProfilerTest.class.st index 10cdc8b..54c74ef 100644 --- a/src/IllimaniProfiler-Tests/IllMemoryProfilerTest.class.st +++ b/src/IllimaniProfiler-Tests/IllMemoryProfilerTest.class.st @@ -39,6 +39,8 @@ IllMemoryProfilerTest >> testProfileOnFinalizesCorrectly [ | timeNow | + self timeLimit: 1 minute. + "The lifetime is calculated in terms of allocated bytes" timeNow := Smalltalk vm parameterAt: 34. profiler profileOn: [ 10 timesRepeat: [ IllMemoryProfiler new ] ]. diff --git a/src/IllimaniProfiler/IllAllocationSiteBin.class.st b/src/IllimaniProfiler/IllAllocationSiteBin.class.st index 42633bc..62c9ed9 100644 --- a/src/IllimaniProfiler/IllAllocationSiteBin.class.st +++ b/src/IllimaniProfiler/IllAllocationSiteBin.class.st @@ -66,6 +66,13 @@ IllAllocationSiteBin >> initialize [ shortLivedObjects := OrderedCollection new ] +{ #category : 'inspector' } +IllAllocationSiteBin >> inspectorAllocSite [ + + + ^ allocationSite inspectionSource +] + { #category : 'accessing' } IllAllocationSiteBin >> longLivedObjects [ diff --git a/src/IllimaniProfiler/IllAnalyzer.class.st b/src/IllimaniProfiler/IllAnalyzer.class.st index d896c61..8e9b124 100644 --- a/src/IllimaniProfiler/IllAnalyzer.class.st +++ b/src/IllimaniProfiler/IllAnalyzer.class.st @@ -167,6 +167,15 @@ IllAnalyzer >> pruneAllocationSites [ allocationSiteBin totalAllocations < (v * totalProgramAllocations) ] ] +{ #category : 'api' } +IllAnalyzer >> setForProfiler: profiler [ + + self + objectAllocations: profiler objectAllocations; + endTime: profiler endTime; + startTime: profiler startTime +] + { #category : 'accessing' } IllAnalyzer >> shortObjectsBin [ diff --git a/src/IllimaniProfiler/IllPredictator.class.st b/src/IllimaniProfiler/IllPredictator.class.st index 5762c32..c3031ae 100644 --- a/src/IllimaniProfiler/IllPredictator.class.st +++ b/src/IllimaniProfiler/IllPredictator.class.st @@ -34,3 +34,9 @@ IllPredictator >> objectAllocations: aCollection [ objectAllocations := aCollection ] + +{ #category : 'initialization' } +IllPredictator >> setForProfiler: aProfiler [ + + self objectAllocations: aProfiler objectAllocations +]