47 using rep = duration::rep;
57 using time_point = std::chrono::time_point<CPUClock, duration>;
149 Timer(
const MPI_Comm mpi_communicator,
const bool sync_lap_times =
false);
158 get_last_lap_wall_time_data()
const;
167 get_accumulated_wall_time_data()
const;
173 template <
typename StreamType>
175 print_last_lap_wall_time_data(StreamType &stream)
const;
181 template <
typename StreamType>
183 print_accumulated_wall_time_data(StreamType &stream)
const;
248 last_wall_time()
const;
274 last_cpu_time()
const;
297 template <
class clock_type_>
386 synchronize_and_update()
const;
761 cpu_and_wall_times_grouped
775 const OutputFrequency output_frequency,
776 const OutputType output_type);
782 const OutputFrequency output_frequency,
783 const OutputType output_type);
796 std::ostream &stream,
797 const OutputFrequency output_frequency,
798 const OutputType output_type);
805 const OutputFrequency output_frequency,
806 const OutputType output_type);
819 enter_subsection(
const std::string §ion_name);
826 leave_subsection(
const std::string §ion_name =
"");
831 std::map<std::string, double>
832 get_summary_data(
const OutputData kind)
const;
839 print_summary()
const;
865 print_wall_time_statistics(
const MPI_Comm mpi_communicator_statistics,
866 const double print_quantile = 0.)
const;
964 if (running ==
false)
965 synchronize_and_update();
967 return last_lap_wall_time_data;
975 if (running ==
false)
976 synchronize_and_update();
978 return accumulated_wall_time_data;
983template <
typename StreamType>
988 stream << statistic.
max <<
" wall,"
989 <<
" max @" << statistic.
max_index <<
", min=" << statistic.
min <<
" @"
990 << statistic.
min_index <<
", avg=" << statistic.
avg << std::endl;
995template <
typename StreamType>
1000 stream << statistic.
max <<
" wall,"
1001 <<
" max @" << statistic.
max_index <<
", min=" << statistic.
min <<
" @"
1002 << statistic.
min_index <<
", avg=" << statistic.
avg << std::endl;
1008 const std::string §ion_name_)
1010 , section_name(section_name_)
1025 timer.leave_subsection(section_name);
const std::string section_name
Scope(::TimerOutput &timer_, const std::string §ion_name)
std::optional< MPI_Comm > mpi_communicator_timing
OutputFrequency output_frequency
std::map< std::string, Timer > sections
std::list< std::string > active_sections
ConditionalOStream out_stream
void enter_subsection(const std::string §ion_name)
Utilities::MPI::MinMaxAvg accumulated_wall_time_data
unsigned int n_timed_laps
MPI_Comm mpi_communicator
ClockMeasurements< wall_clock_type > wall_times
void print_accumulated_wall_time_data(StreamType &stream) const
ClockMeasurements< cpu_clock_type > cpu_times
const Utilities::MPI::MinMaxAvg & get_accumulated_wall_time_data() const
Utilities::MPI::MinMaxAvg last_lap_wall_time_data
const Utilities::MPI::MinMaxAvg & get_last_lap_wall_time_data() const
std::chrono::steady_clock wall_clock_type
void print_last_lap_wall_time_data(StreamType &stream) const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
std::chrono::microseconds duration
static time_point now() noexcept
static const bool is_steady
std::chrono::time_point< CPUClock, duration > time_point
typename clock_type::time_point time_point_type
time_point_type current_lap_start_time
typename clock_type::duration duration_type
duration_type accumulated_time
duration_type last_lap_time