Loading...
Searching...
No Matches
TimeLogger Class Reference

Time logger maintaining data collected by Timer, if registered. More...

`#include <TimeLogger.h>`

## Public Member Functions

void | register_timing (const std::string &task, std::chrono::duration< double, std::ratio< 1 > > wall)
| Register timing (for later summary).
Table | timing_table () const
| Return a summary of timings and tasks in a Table.
void | list_timings (MPI_Comm comm, Table::Reduction reduction) const
std::pair< int, std::chrono::duration< double, std::ratio< 1 > > > | timing (const std::string &task) const
| Return timing.
std::map< std::string, std::pair< int, std::chrono::duration< double, std::ratio< 1 > > > > | timings () const
| Logged elapsed times.

## Static Public Member Functions

static TimeLogger & | instance ()
| Singleton access.

## Detailed Description

Time logger maintaining data collected by Timer, if registered.

Note
  This is a monotstate, i.e. the data members are static and thus timings are aggregated into a single map.

## Member Function Documentation

## instance()

TimeLogger & instance | ( |  | ) |

static

Singleton access.

Returns
  Unique time logger object.

## list_timings()

void list_timings | ( | MPI_Comm | comm,
|  | Table::Reduction | reduction ) const

List a summary of timings and tasks. Reduction type is printed.

Parameters

  comm | MPI Communicator
  reduction | Reduction type (min, max or average)

## timing()

std::pair< int, std::chrono::duration< double, std::ratio< 1 > > > timing | ( | const std::string & | task | ) | const

Return timing.

Parameters

  [in] | task | The task name to retrieve the timing for

Returns
  Values (count, total wall time) for given task.

## timings()

std::map< std::string, std::pair< int, std::chrono::duration< double, std::ratio< 1 > > > > timings | ( |  | ) | const

Logged elapsed times.

Returns
  Elapsed [task id: (count, total wall time)].

The documentation for this class was generated from the following files:

- /build/fenics-dolfinx-PdyzCE/fenics-dolfinx-0.10.0.post5/cpp/dolfinx/common/TimeLogger.h
- /build/fenics-dolfinx-PdyzCE/fenics-dolfinx-0.10.0.post5/cpp/dolfinx/common/TimeLogger.cpp