Module Sundials.Profiler

module Profiler: sig .. end

Performance profiling

The underlying Sundials library must be built with SUNDIALS_BUILD_WITH_PROFILING set to on. Profiling is light-weight but can still reduce performance.

The SUNPROFILER_PRINT environment variable determines whether profiler information is printed when a context is freed (by the garbage collector).

The profiling functions (silently) do nothing when profiling is not available.


type t = Profiler.t 

A Sundials profiler.

val enabled : bool

Indicates whether the underlying library was built with profiling enabled.

val make : string -> t

Creates a new profiler with the given name.

val start : t -> string -> unit

Starts timing the region indicated by the given name.

val finish : t -> string -> unit

Ends timing the region indicated by the given name.

val print : t -> Sundials.Logfile.t -> unit

Prints out a profiling summary.