DOLFINx 0.12.0.0
DOLFINx C++
Loading...
Searching...
No Matches
timing.h
1// Copyright (C) 2005-2010 Anders Logg, 2015 Jan Blechta
2//
3// This file is part of DOLFINx (https://www.fenicsproject.org)
4//
5// SPDX-License-Identifier: LGPL-3.0-or-later
6
7#pragma once
8
9#include "Table.h"
10#include <chrono>
11#include <map>
12#include <mpi.h>
13#include <string>
14#include <string_view>
15#include <utility>
16
17namespace dolfinx
18{
22
29void list_timings(MPI_Comm comm,
30 Table::Reduction reduction = Table::Reduction::max);
31
35std::pair<int, std::chrono::duration<double, std::ratio<1>>>
36timing(std::string_view task);
37
40std::map<std::string,
41 std::pair<int, std::chrono::duration<double, std::ratio<1>>>,
42 std::less<>>
43timings();
44
45} // namespace dolfinx
This class provides storage and pretty-printing for tables.
Definition Table.h:30
Reduction
Definition Table.h:35
Top-level namespace.
Definition defines.h:12
void list_timings(MPI_Comm comm, Table::Reduction reduction=Table::Reduction::max)
List a summary of timings and tasks.
Definition timing.cpp:18
std::pair< int, std::chrono::duration< double, std::ratio< 1 > > > timing(std::string_view task)
Return timing (count, total wall time) for given task.
Definition timing.cpp:24
Table timing_table()
Return a summary of timings and tasks in a Table.
Definition timing.cpp:13
std::map< std::string, std::pair< int, std::chrono::duration< double, std::ratio< 1 > > >, std::less<> > timings()
Logged elapsed times.
Definition timing.cpp:32