Remote Runner: Runner Log Statistics
GtRrRunnerLogTimingAnalyzer
provides basic functionality for storing and analysing statistics from the remote runner log file, facilitating:
monitoring performance over a timespan
helping identify the cause of delays in job execution
There are basically two phases:
1. Gathering and storing statistics
2. Comparing an individual run to the norm.
Only basic statistics are stored, i.e. average, min, max and standard deviation, so all logs that are fed in to the statistics need to be comparible, i.e. if the characteristics of the system, speed of workers, time for workers to start, etc. normally vary a lot, the comparisons will be less useful.
In all cases below the log files are those stored by GtRemoteRunner
, typically specified using GtRemoteRunner>>#moveLoggingTo:
.
For a new dataset, analyse a number of files and save the timing stats, e.g.:
analyzer := GtRrRunnerLogTimingAnalyzer analyzeFiles:
('C:\gt\akg\new' asFileReference childrenMatching: 'remoteRunner-*.log').
newStats := analyzer timingStats.
newStats saveToFile: 'remoteRunner-baselineStats.ston'.
A previously saved dataset can be loaded with:
baselineStats := GtRrRunnerLogTimingStats loadFromFile: 'remoteRunnner-baselineStats.ston'.
The baseline dataset can be extended with:
"Assuming that the remoteRunner log files are newer than those above"
analyzer := GtRrRunnerLogTimingAnalyzer analyzeFiles:
('C:\gt\akg\new' asFileReference childrenMatching: 'remoteRunner-*.log').
analyzer appendStatsTo: baselineStats.
baselineStats saveToFile: 'remoteRunner-baselineStats.ston'.
To obtain a report inspect:
"Create comparator and run comparison" comparator := GtRrRunnerLogTimingStatsComparator baseline: baselineStats testLogFile: 'remoteRunner.log' asFileReference. comparator compare. comparator.