Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanmontt committed Sep 22, 2023
1 parent acdb6e9 commit d859972
Show file tree
Hide file tree
Showing 36 changed files with 110 additions and 90 deletions.
18 changes: 6 additions & 12 deletions src/BaselineOfIllimaniProfiler/BaselineOfIllimaniProfiler.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,12 @@ BaselineOfIllimaniProfiler >> baseline: spec [
<baseline>
spec for: #common do: [
"Packages"
spec package: 'IllimaniKernel'
spec package: 'IllimaniProfiler'
with: [ spec requires: #( 'MethodProxies' ) ].
spec package: 'IllimaniAllocationProfiler'
with: [ spec requires: #( 'IllimaniKernel' 'MethodProxies' ) ].
spec package: 'IllimaniFinalizationProfiler'
with: [ spec requires: #( 'IllimaniKernel' 'IllimaniAllocationProfiler' 'MethodProxies' ) ].
spec package: 'IllimaniUI'
with: [ spec requires: #( 'IllimaniAllocationProfiler' 'IllimaniFinalizationProfiler' ) ].
spec package: 'IllimaniAllocationProfiler-Tests'
with: [ spec requires: #( 'IllimaniAllocationProfiler' ) ].
spec package: 'IllimaniFinalizationProfiler-Tests'
with: [ spec requires: #( 'IllimaniFinalizationProfiler' ) ].
with: [ spec requires: #( 'IllimaniProfiler' ) ].
spec package: 'IllimaniProfiler-Tests'
with: [ spec requires: #( 'IllimaniProfiler' ) ].

"External dependencies"
spec baseline: 'MethodProxies'
Expand All @@ -45,7 +39,7 @@ BaselineOfIllimaniProfiler >> baseline: spec [
"Groups"
spec group: 'default' with: #( 'core' 'tests' ).
spec group: 'core'
with: #( 'IllimaniAllocationProfiler' 'IllimaniUI' 'IllimaniFinalizationProfiler' 'IllimaniKernel' ).
with: #( 'IllimaniProfiler' 'IllimaniUI' ).
spec group: 'tests'
with: #( 'IllimaniAllocationProfiler-Tests' 'IllimaniFinalizationProfiler-Tests' ) ]
with: #( 'IllimaniProfiler-Tests' ) ]
]
1 change: 0 additions & 1 deletion src/IllimaniAllocationProfiler-Tests/package.st

This file was deleted.

1 change: 0 additions & 1 deletion src/IllimaniAllocationProfiler/package.st

This file was deleted.

1 change: 0 additions & 1 deletion src/IllimaniFinalizationProfiler-Tests/package.st

This file was deleted.

1 change: 0 additions & 1 deletion src/IllimaniFinalizationProfiler/package.st

This file was deleted.

6 changes: 0 additions & 6 deletions src/IllimaniKernel/IllAnnouncer.class.st

This file was deleted.

6 changes: 0 additions & 6 deletions src/IllimaniKernel/IllStopedProfilingAnnouncement.class.st

This file was deleted.

1 change: 0 additions & 1 deletion src/IllimaniKernel/package.st

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Class {
'fixture',
'statsModel'
],
#category : 'IllimaniAllocationProfiler-Tests-Statistics-Model',
#package : 'IllimaniAllocationProfiler-Tests',
#tag : 'Statistics-Model'
#category : 'IllimaniProfiler-Tests-Model-Statistics',
#package : 'IllimaniProfiler-Tests',
#tag : 'Model-Statistics'
}

{ #category : 'running' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Class {
'groupedAndSortedByMethodAllocations',
'mockedAllocations'
],
#category : 'IllimaniAllocationProfiler-Tests-Statistics-Model',
#package : 'IllimaniAllocationProfiler-Tests',
#tag : 'Statistics-Model'
#category : 'IllimaniProfiler-Tests-Model-Statistics',
#package : 'IllimaniProfiler-Tests',
#tag : 'Model-Statistics'
}

{ #category : 'fixture' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Class {
#instVars : [
'illimani'
],
#category : 'IllimaniAllocationProfiler-Tests-Profiler',
#package : 'IllimaniAllocationProfiler-Tests',
#tag : 'Profiler'
#category : 'IllimaniProfiler-Tests-Allocations-Profiler',
#package : 'IllimaniProfiler-Tests',
#tag : 'Allocations-Profiler'
}

{ #category : 'running' }
Expand Down Expand Up @@ -60,9 +60,7 @@ IllAllocationProfilerTest >> testProfileOnSimpleMoreAllocations [

self assert: illimani objectAllocations size > 1000.
illimani objectAllocations do: [ :alloc |
self assert: alloc allocatedObjectClass isClass.
"Stack was copied"
self assert: alloc context class equals: Context ]
self assert: alloc allocatedObjectClass isClass ]
]

{ #category : 'tests' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Class {
#instVars : [
'finalizationProfiler'
],
#category : 'IllimaniFinalizationProfiler-Tests-Tests',
#package : 'IllimaniFinalizationProfiler-Tests',
#tag : 'Tests'
#category : 'IllimaniProfiler-Tests-Finalization-Profiler',
#package : 'IllimaniProfiler-Tests',
#tag : 'Finalization-Profiler'
}

{ #category : 'running' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Class {
#instVars : [
'profiler'
],
#category : 'IllimaniFinalizationProfiler-Tests-Tests',
#package : 'IllimaniFinalizationProfiler-Tests',
#tag : 'Tests'
#category : 'IllimaniProfiler-Tests-Finalization-Profiler',
#package : 'IllimaniProfiler-Tests',
#tag : 'Finalization-Profiler'
}

{ #category : 'tests' }
Expand Down
1 change: 1 addition & 0 deletions src/IllimaniProfiler-Tests/package.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package { #name : 'IllimaniProfiler-Tests' }
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Class {
'allocatorMethod',
'contextFingerprint'
],
#category : 'IllimaniAllocationProfiler-Model',
#package : 'IllimaniAllocationProfiler',
#tag : 'Model'
#category : 'IllimaniProfiler-Model-Allocation',
#package : 'IllimaniProfiler',
#tag : 'Model-Allocation'
}

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Class {
'allocationNodesByMethod',
'didIWalk'
],
#category : 'IllimaniAllocationProfiler-Statistics-Model',
#package : 'IllimaniAllocationProfiler',
#tag : 'Statistics-Model'
#category : 'IllimaniProfiler-Model-Statistics',
#package : 'IllimaniProfiler',
#tag : 'Model-Statistics'
}

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Class {
'finalizationTime',
'initializationTime'
],
#category : 'IllimaniAllocationProfiler-Model',
#package : 'IllimaniAllocationProfiler',
#tag : 'Model'
#category : 'IllimaniProfiler-Model-Allocation',
#package : 'IllimaniProfiler',
#tag : 'Model-Allocation'
}

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : 'Duration' }

{ #category : '*IllimaniKernel' }
{ #category : '*IllimaniProfiler' }
Duration >> asDeciSeconds [


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : 'FinalizationRegistry' }

{ #category : '*IllimaniFinalizationProfiler' }
{ #category : '*IllimaniProfiler' }
FinalizationRegistry >> finalizeAllEphemerons [

| node |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Class {
#instVars : [
'objectAllocations'
],
#category : 'IllimaniFinalizationProfiler-Profiler',
#package : 'IllimaniFinalizationProfiler',
#tag : 'Profiler'
#category : 'IllimaniProfiler-Model-Statistics',
#package : 'IllimaniProfiler',
#tag : 'Model-Statistics'
}

{ #category : 'instance creation' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Class {
'sortedByTotalAllocationsNodes',
'groupedNodesDictionary'
],
#category : 'IllimaniAllocationProfiler-Statistics-Model',
#package : 'IllimaniAllocationProfiler',
#tag : 'Statistics-Model'
#category : 'IllimaniProfiler-Model-Statistics',
#package : 'IllimaniProfiler',
#tag : 'Model-Statistics'
}

{ #category : 'converting' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Class {
'allocator',
'groupedAllocations'
],
#category : 'IllimaniAllocationProfiler-Statistics-Model',
#package : 'IllimaniAllocationProfiler',
#tag : 'Statistics-Model'
#category : 'IllimaniProfiler-Model-Statistics',
#package : 'IllimaniProfiler',
#tag : 'Model-Statistics'
}

{ #category : 'api' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ Class {
'totalGCTime',
'endOfProfilingTime'
],
#category : 'IllimaniKernel',
#package : 'IllimaniKernel'
#category : 'IllimaniProfiler-Instrumentation',
#package : 'IllimaniProfiler',
#tag : 'Instrumentation'
}

{ #category : 'accessing - statistics' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ Class {
'classesToAvoidInTheContextSearch',
'objectAllocations'
],
#category : 'IllimaniAllocationProfiler-Profiler',
#package : 'IllimaniAllocationProfiler',
#tag : 'Profiler'
#category : 'IllimaniProfiler-Allocation-Profiler',
#package : 'IllimaniProfiler',
#tag : 'Allocation-Profiler'
}

{ #category : 'announcements' }
Expand Down
7 changes: 7 additions & 0 deletions src/IllimaniProfiler/IllAnnouncer.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Class {
#name : 'IllAnnouncer',
#superclass : 'Announcer',
#category : 'IllimaniProfiler-Instrumentation',
#package : 'IllimaniProfiler',
#tag : 'Instrumentation'
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Class {
'initializationTime',
'allocatedObjectClass'
],
#category : 'IllimaniFinalizationProfiler-Ephemerons',
#package : 'IllimaniFinalizationProfiler',
#tag : 'Ephemerons'
#category : 'IllimaniProfiler-Finalization-Ephemerons',
#package : 'IllimaniProfiler',
#tag : 'Finalization-Ephemerons'
}

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Class {
'ephemeronsCollection',
'statsModel'
],
#category : 'IllimaniFinalizationProfiler-Profiler',
#package : 'IllimaniFinalizationProfiler',
#tag : 'Profiler'
#category : 'IllimaniProfiler-Finalization-Profiler',
#package : 'IllimaniProfiler',
#tag : 'Finalization-Profiler'
}

{ #category : 'profiling' }
Expand All @@ -34,7 +34,7 @@ IllFinalizationProfiler >> internalRegisterAllocation: anObject [
yourself)
]

{ #category : 'api' }
{ #category : 'accessing' }
IllFinalizationProfiler >> objectAllocations [

^ ephemeronsCollection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Class {
#name : 'IllFinalizationRegistry',
#superclass : 'FinalizationRegistry',
#category : 'IllimaniFinalizationProfiler-Ephemerons',
#package : 'IllimaniFinalizationProfiler',
#tag : 'Ephemerons'
#category : 'IllimaniProfiler-Finalization-Ephemerons',
#package : 'IllimaniProfiler',
#tag : 'Finalization-Ephemerons'
}

{ #category : 'profiling' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Class {
'unprocessedFinalizations',
'unprocessedAllocations'
],
#category : 'IllimaniFinalizationProfiler-Profiler',
#package : 'IllimaniFinalizationProfiler',
#tag : 'Profiler'
#category : 'IllimaniProfiler-Finalization-Profiler',
#package : 'IllimaniProfiler',
#tag : 'Finalization-Profiler'
}

{ #category : 'profiling' }
Expand Down Expand Up @@ -103,6 +103,12 @@ IllFinalizationUnprocessedAllocationsProfiler >> stopProfiling [
self forceFinalizationOfObjects
]

{ #category : 'as yet unclassified' }
IllFinalizationUnprocessedAllocationsProfiler >> uiClass [

^ IllFinalizationProfilerUI
]

{ #category : 'accessing' }
IllFinalizationUnprocessedAllocationsProfiler >> unprocessedAllocations [

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Class {
#instVars : [
'profiler'
],
#category : 'IllimaniKernel',
#package : 'IllimaniKernel'
#category : 'IllimaniProfiler-Instrumentation',
#package : 'IllimaniProfiler',
#tag : 'Instrumentation'
}

{ #category : 'evaluating' }
Expand Down
7 changes: 7 additions & 0 deletions src/IllimaniProfiler/IllStopedProfilingAnnouncement.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Class {
#name : 'IllStopedProfilingAnnouncement',
#superclass : 'Announcement',
#category : 'IllimaniProfiler-Announcement',
#package : 'IllimaniProfiler',
#tag : 'Announcement'
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Class {
#name : 'MpNullMethodProxy',
#superclass : 'Object',
#category : 'IllimaniKernel',
#package : 'IllimaniKernel'
#category : 'IllimaniProfiler-Instrumentation',
#package : 'IllimaniProfiler',
#tag : 'Instrumentation'
}

{ #category : 'instance creation' }
Expand Down
1 change: 1 addition & 0 deletions src/IllimaniProfiler/package.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package { #name : 'IllimaniProfiler' }
8 changes: 7 additions & 1 deletion src/IllimaniUI/IllAbstractProfiler.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ Extension { #name : 'IllAbstractProfiler' }
{ #category : '*IllimaniUI' }
IllAbstractProfiler >> open [

^ (IllAllocationProfilerUI profiler: self announcer: self illimaniAnnouncer)
^ (self uiClass profiler: self announcer: self illimaniAnnouncer)
open;
yourself
]

{ #category : '*IllimaniUI' }
IllAbstractProfiler >> uiClass [

^ self subclassResponsibility
]
7 changes: 7 additions & 0 deletions src/IllimaniUI/IllAllocationProfiler.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : 'IllAllocationProfiler' }

{ #category : '*IllimaniUI' }
IllAllocationProfiler >> uiClass [

^ IllAllocationProfilerUI
]
Loading

0 comments on commit d859972

Please sign in to comment.