DIRECTORY BasicTime, IO; GGStatistics: CEDAR DEFINITIONS = BEGIN Table: TYPE = REF TableObj; TableObj: TYPE = RECORD [ intervals: LIST OF Interval, name: ATOM ]; 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 [name: ATOM] RETURNS [table: Table]; GetTable: PROC [name: ATOM] 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]; AddInt: PROC [interval: Interval, tableName: ATOM]; ResetInterval: PROC [name: ATOM, table: Table]; StartInterval: PROC [name: ATOM, table: Table]; StartInt: PROC [intervalName: ATOM, tableName: ATOM]; StopInterval: PROC [name: ATOM, table: Table]; StopInt: PROC [intervalName: ATOM, tableName: ATOM]; PrintTable: PROC [f: IO.STREAM, table: Table]; END. DGGStatistics.mesa Copyright c 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. Getting ready to test performance. Creates a table and registers it in a global database, so it can be retrieved by name. If a table of this name already exists, it is reset and returned. Retrieve a table by name. StartInterval[$IntervalName, GetTable[$TableName]] is a sensible way to start an interval that is deep in the code of a known application. Set all of the interval times to zero. Equivalent to AddInterval[interval, GetTable[tableName]]. Testing performance. Equivalent to StartInterval[intervalName, GetTable[tableName]]. Equivalent to StopInterval[intervalName, GetTable[tableName]]. Printing results. ΚP˜J˜Icodešœ™Kšœ Οmœ1™™>—K˜K™K™KšŸ œžœžœžœ˜.K˜Kšžœ˜—…—H ά