## compile-statistics.api
# Compiled by:
#
src/lib/compiler/front/basics/basics.sublib# This api is implemented in:
#
src/lib/compiler/front/basics/stats/compile-statistics.pkgapi Compile_Statistics {
#
Counterssum;
Counter;
# The counters (argument) will be incremented
# whenever the new counter is incremented:
#
make_counter: List(Counter) -> Counter;
get_counter_value: Counter -> Int;
increment_counter_by: Counter -> Int -> Void;
# A Counterssum value contains a list of Counters
# and computes the sum of them on request:
#
make_counterssum: (String, List( Counter )) -> Counterssum;
compute_sum_of_counters: Counterssum -> Int;
note_counterssum: Counterssum -> Void; # Add the Counterssum to the summary.
# Old interface, deprecated:
#
make_counterssum': String -> Counterssum;
increment_counterssum_by: Counterssum -> Int -> Void;
Compiler_Phase;
make_compiler_phase: String -> Compiler_Phase;
do_compiler_phase: Compiler_Phase -> (X -> Y) -> (X -> Y);
#
keep_time: Ref( Bool );
approx_time: Ref( Bool ); # Doesn't do anything right now
#
# At the moment these three are controlled by hardwired logic in
#
src/app/makelib/compile/compile-in-dependency-order-g.pkg # -- look for show_compile_compiler_phase_runtimes_for():
#
say_begin: Ref( Bool ); # If *TRUE, announce on stdout the start of execution of each compiler_phase.
say_end: Ref( Bool ); # If *TRUE, announce on stdout the end of execution of each compiler_phase, and elapsed CPU time.
say_when_nonzero: Ref( Bool ); # If *TRUE (and say_end == *TRUE), say_end will print even if the time is zero. (This is very verbose!)
#
summary: Void -> Void;
summary_sp: Void -> Void;
reset: Void -> Void;
};