GGStatistics.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last edited by Bier on June 18, 1986
Contents: Routines for maintaining a table of average times for user-specified operations.
GGStatistics: CEDAR DEFINITIONS =
BEGIN
Table: TYPE = REF TableObj;
TableObj:
TYPE =
RECORD [
intervals: LIST OF Interval
];
Interval: TYPE = REF IntervalObj;
IntervalObj:
TYPE =
RECORD [
name: ATOM,
subintervals: LIST OF Interval,
starts, stops, unmatchedStarts: NAT,
startTime: BasicTime.Pulses,
totalTime: BasicTime.Pulses,
maxTime: BasicTime.Pulses,
maxIndex: NAT,
minTime: BasicTime.Pulses
];
CreateTable: PROC [] RETURNS [table: Table];
GlobalTable: PROC [] RETURNS [table: Table];
ResetTable: PROC [table: Table];
CreateInterval: PROC [name: ATOM, subintervals: LIST OF Interval ← NIL] RETURNS [interval: Interval];
AddInterval: PROC [interval: Interval, table: Table];
StartInterval: PROC [name: ATOM, table: Table];
StopInterval: PROC [name: ATOM, table: Table];
ResetInterval: PROC [name: ATOM, table: Table];
PrintTable: PROC [f: IO.STREAM, table: Table];
END.