Performers.mesa
Jlarson, July 10, 1985 4:51:29 pm PDT
DIRECTORY
Plotter USING [Create],
RealEvent USING [CreateTimerDrivenStream],
SafeStorage USING [NWordsAllocated, NWordsReclaimed],
Timer USING[Seconds];
Performers: PROGRAM
IMPORTS Plotter, RealEvent, SafeStorage
= BEGIN
samplingInterval: Timer.Seconds = 5;
nEvents: NAT = 100;
SAMPLING PROCEDURES
WordsAllocatedSampler: PROC[s: REF ANY] RETURNS[REAL] =
{RETURN[SafeStorage.NWordsAllocated[]];
};
WordsISSampler: PROC[s: REF ANY] RETURNS[REAL] =
{RETURN[SafeStorage.NWordsAllocated[] - SafeStorage.NWordsReclaimed[]];
};
START HERE...Create performance plotters
[] ← Plotter.Create[label: "wordsPerSecHistory",
autoRepaint: TRUE,
nEvents: nEvents,
plotValueDifferences: TRUE,
plotValuePerSecond: TRUE,
eventSource: RealEvent.CreateTimerDrivenStream[interval: samplingInterval, sampler: WordsAllocatedSampler]];
[] ← Plotter.Create[label: "wordsInServiceHistory",
autoRepaint: TRUE,
  nEvents: nEvents,
     eventSource: RealEvent.CreateTimerDrivenStream[interval: samplingInterval, sampler: WordsISSampler]];
END.