LightKrylov_Timer_Utils Module


Uses


Derived Types

type, public, abstract ::  abstract_watch

Base type to define a global timer. All watches within LightKrylov and associated tools are derived from this type.

Read more…

Type-Bound Procedures

procedure, public, pass(self) :: add_group

Add new timer group to the watch.

procedure, public, pass(self) :: add_timer

Add new timer to the watch.

procedure, public, pass(self) :: enumerate

Print summary of registered timers and their current status.

procedure, public, pass(self) :: finalize

Gather timing information and print it to screen/logfile.

procedure, public, pass(self) :: get_data => get_timer_data_by_name
procedure, public, pass(self) :: get_group_id
procedure, public, pass(self) :: get_time => get_timer_etime_by_name
procedure, public, pass(self) :: get_timer_id
procedure, public, pass(self) :: initialize

Set up private timers, flags and counters. Switch on timing.

procedure, public, pass(self) :: pause => pause_timer_by_name
procedure, public, pass(self) :: print_info => print_timer_info_by_name
procedure, public, pass(self) :: remove_timer

Remove existing timer from the watch.

procedure, public, pass(self) :: reset => reset_timer_by_name
procedure, public, pass(self) :: reset_all

Reset all timers in watch.

procedure(abstract_set_timers), public, deferred, pass(self) :: set_private_timers_and_name

Define private timers that cannot be removed by the user.

procedure, public, pass(self) :: set_watch_name
procedure, public, pass(self) :: start => start_timer_by_name
procedure, public, pass(self) :: stop => stop_timer_by_name

type, public ::  lightkrylov_timer

Individual timer. Atomic timer that is associated to a particular 'event' by name which may be a procedure or a user-defined string at instantiation.

Read more…

Components

Type Visibility Attributes Name Initial
character(len=128), public :: name = 'default_timer'

Timer name.

Type-Bound Procedures

procedure, public, pass(self) :: finalize => finalize_timer

Aggregate data and prepare summary.

procedure, public, pass(self) :: get_data => get_timer_data

Getter routine to access to all local data: etime, counts, etime_max, etime_min, etime_pause.

procedure, public, pass(self) :: get_time => get_timer_etime

Getter routine to access self%etime only.

procedure, public, pass(self) :: pause => pause_timer
procedure, public, pass(self) :: print_info => print_timer_info

Print timing data.

procedure, public, pass(self) :: reset => reset_timer

Reset timing data (soft/hard, clear/save data).

procedure, public, pass(self) :: save_timer_data

Transfer timing data to arrays.

procedure, public, pass(self) :: start => start_timer
procedure, public, pass(self) :: stop => stop_timer

type, public ::  lightkrylov_timer_group

Simple type to allow for some structure in the timer output.

Components

Type Visibility Attributes Name Initial
character(len=128), public :: name = 'default_group'

group name.