GoblintCil.Stats
Utilities for maintaining timing statistics
type t = {
name : string;
Name of the task
*)mutable time : float;
In seconds
*)mutable ncalls : int;
mutable sub : t list;
Subtasks
*)}
A timing entry
val top : t
The top-level timing entry
val reset : timerModeEnum -> unit
Resets all the timings and specifies the method to use for future timings. Call this before doing any timing.
Flag to indicate whether or not to count the number of calls of to Stats.repeattime
or Stats.time
for each label. (default: false)
Time a function and associate the time with the given string. If some timing information is already associated with that string, then accumulate the times. If this function is invoked within another timed function then you can have a hierarchy of timings
repeattime is like time but runs the function several times until the total running time is greater or equal to the first argument. The total time is then divided by the number of times the function was run.
Return the cumulative time of all calls to Stats.time
and Stats.repeattime
with the given label.