Loading...
Searching...
No Matches
timing.h
// Copyright (C) 2005-2010 Anders Logg, 2015 Jan Blechta
//
// This file is part of DOLFINx (https://www.fenicsproject.org)
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include "Table.h"
#include <chrono>
#include <map>
#include <mpi.h>
#include <string>
#include <utility>
namespace dolfinx
{
Table timing_table();
void list_timings(MPI_Comm comm,
Table::Reduction reduction = Table::Reduction::max);
std::pair<int, std::chrono::duration<double, std::ratio<1>>>
timing(const std::string& task);
std::map<std::string,
std::pair<int, std::chrono::duration<double, std::ratio<1>>>>
timings();
} // namespace dolfinx
dolfinx::Table
This class provides storage and pretty-printing for tables.
Definition Table.h:29
dolfinx::Table::Reduction
Reduction
Definition Table.h:34
dolfinx
Top-level namespace.
Definition defines.h:12
dolfinx::list_timings
void list_timings(MPI_Comm comm, Table::Reduction reduction=Table::Reduction::max)
List a summary of timings and tasks.
Definition timing.cpp:18
dolfinx::timing_table
Table timing_table()
Return a summary of timings and tasks in a Table.
Definition timing.cpp:13
dolfinx::timing
std::pair< int, std::chrono::duration< double, std::ratio< 1 > > > timing(const std::string &task)
Return timing (count, total wall time) for given task.
Definition timing.cpp:24
dolfinx::timings
std::map< std::string, std::pair< int, std::chrono::duration< double, std::ratio< 1 > > > > timings()
Logged elapsed times.
Definition timing.cpp:31