--
-- RUN_TIME_STATISTICS by Richard Conn, TI Ada Technology Branch
-- 27 Feb 85
--

with Count_Statistics;
package Run_Time_Statistics is
    --------------------------------------------------------------------------
    -- Abstract   : run_time_STATISTICS maintains counters which may be used
    --               to keep track of the frequency of certain error
    --               conditions, as enumerated in the type STATISTIC.  To
    --               use this package, the routine INITIALIZE_COUNTERS will
    --               clear all counters, the routine INCREMENT_COUNTER will
    --               increment the indicated counter, and the routine
    --               COUNT will return the value of the indicated counter.
    --
    --------------------------------------------------------------------------

    type Statistic is (Corrected_Words, Suspect_Words,
                       Failed_Restores, Words_Changing_Length);

    package Rts is new Count_Statistics (Statistic);

    procedure Initialize_Counters renames Rts.Initialize_Counters;
    --------------------------------------------------------------------------
    -- Abstract   : This routine sets the values of all counters to zero.
    --------------------------------------------------------------------------


    procedure Increment_Counter (Counter : Statistic)
        renames Rts.Increment_Counter;
    --------------------------------------------------------------------------
    -- Abstract   : This routine increments the indicated counter.
    --------------------------------------------------------------------------


    function Count (Counter : Statistic) return Natural renames Rts.Count;
    --------------------------------------------------------------------------
    -- Abstract   : This routine returns the value of the indicated counter.
    --------------------------------------------------------------------------

end Run_Time_Statistics;