Analysing the image size and its evolution

This page looks into analysing the size of the Glamorous Toolkit image. It also shows how to analyse the size of the image over time.

This analysis is based on SpaceTally Object subclass: #SpaceTally instanceVariableNames: 'results' classVariableNames: '' package: 'Tool-Profilers-Space' and it reports memory space consumed by instances of each class in the system.

GtSpaceTallyHistory Object subclass: #GtSpaceTallyHistory instanceVariableNames: 'tallyVersions tallyItemVersionsByClassName' classVariableNames: '' package: 'GToolkit-Utility-SpaceTally' contains a list of GtSpaceTallyVersion Object subclass: #GtSpaceTallyVersion instanceVariableNames: 'index label timestamp spaceTally vmStatisticsReport' classVariableNames: '' package: 'GToolkit-Utility-SpaceTally' , where each version holds a GtSpaceTally SpaceTally subclass: #GtSpaceTally instanceVariableNames: 'label' classVariableNames: '' package: 'GToolkit-Utility-SpaceTally' .

Current history

The system maintains a default history, and it adds several tallies to it during the creation of the Glamorous Toolkit image. Below is the list of versions curently recorded.

We can also explore the history by looking at the difference in memory by grouping instances by the package or repository defining the class of the instance.

Managing the history

The current object holding the history can be accessed using the snippet below.

GtSpaceTallyHistory default

We can add when needed new recordings to the history.

GtSpaceTallyHistory recordDefaultSystemWideData

We can also label the version.

GtSpaceTallyHistory recordDefaultSystemWideDataLabeled: 'Custom Label'

In case we have multiple versions in the history we can create diffs between any two versions.

diff := GtSpaceTallyDiff new 
	sourceVersion: GtSpaceTallyHistory default firstVersion;
	targetVersion: GtSpaceTallyHistory default latestVersion.

Individual tallies

We can also creatre invidual space tallies if needed.

spaceTally := GtSpaceTally new.
spaceTally systemWideSpaceTally.