Profiling the execution of a release
Executing a release consists in running a set of release actions.
If there are slowdowns it can be useful to profile the execution to determine what is slow. One way to profile the execution of a release is by measuring the time it takes to execute every action.
This pages how to profile the execution of release actions. There are two ways to main ways to approach this:
- execute the release in-image and analyse the Logging with Beacon signals raised during execution
- parse a releaser log, recreating the Logging with Beacon signals raised during execution
Profiling the execution of a release inside the image
One way to profile a release is to directly execute it inside the image.
GtRlReleaserEventsCollector
provides a way to monitor releaser actions. The simplest way is to use the default instance of the collector.
GtRlReleaserEventsCollector start
GtRlReleaserEventsCollector start
GtRlReleaserEventsCollector reset.
GtRlReleaserEventsCollector defaultInstance
Aternatively we can create a new collector instance.
eventsCollector := GtRlReleaserEventsCollector new
eventsCollector start
eventsCollector reset.
In case multiple instance of the collector are registered, the snippet below will stop them and also remove all content.
GtRlReleaserEventsCollector allInstances do: #stop
GtRlReleaserEventsCollector allInstances do: #reset
The collector uses Beacon signals subclassing GtRlActionExecutionSignal
. It is also possible to listen for those events directly using beacon.
logger := MemoryLogger startFor: GtRlActionExecutionSignal.
logger start
logger stop
Parsing a releaser log
We can also parse a release log and recreate Beacon events raised during execution.
GtRlReleaserSignalsLogReader
provides the logic for parsing. It creates a GtRlReleaserEventsGrouper
that provides various ways to inspect the log.
The snippets below load a log takes from the clipboard.
readStream := Clipboard clipboardText asString readStream
eventsGrouper := GtRlReleaserSignalsLogReader readFrom: readStream