Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::ITimeStats Class Referenceabstract

Interface managing execution time statistics. More...

#include <arcane/core/ITimeStats.h>

Inheritance diagram for Arcane::ITimeStats:
Collaboration diagram for Arcane::ITimeStats:

Public Member Functions

virtual void beginGatherStats ()=0
 Starts time collection.
virtual void endGatherStats ()=0
 Stops time collection.
virtual void beginAction (const String &action_name)=0
virtual void endAction (const String &action_name, bool print_time)=0
virtual void beginPhase (eTimePhase phase)=0
virtual void endPhase (eTimePhase phase)=0
virtual Real elapsedTime (eTimePhase phase)=0
 Real elapsed time for phase phase.
virtual Real elapsedTime (eTimePhase phase, const String &action)=0
 Elapsed time for a phase of an action.
virtual void dumpCurrentStats (const String &name)=0
 Displays statistics for an action.
virtual void dumpStats (std::ostream &ostr, bool is_verbose, Real nb, const String &name, bool use_elapsed_time=false)=0
 Displays execution time statistics.
virtual void dumpTimeAndMemoryUsage (IParallelMng *pm)=0
 Displays the current date and memory consumption.
virtual bool isGathering () const =0
 Indicates if statistics are active.
virtual void dumpStatsJSON (JSONWriter &writer)=0
 Serializes the temporal statistics into the writer writer.
virtual ITimeMetricCollectormetricCollector ()=0
 Associated collection interface.
virtual void notifyNewIterationLoop ()=0
 Notifies that a new iteration of the calculation loop begins.
virtual void saveTimeValues (Properties *p)=0
virtual void mergeTimeValues (Properties *p)=0
virtual void resetStats (const String &action_name)=0

Detailed Description

Interface managing execution time statistics.

You must call beginGatherStats() to start collecting the information and call endGatherStats() to stop the collection.

Generally, this interface is not used directly but through the Timer::Phase and Timer::Action classes.

The methods of this class must only be called by a single thread.

Definition at line 43 of file ITimeStats.h.

Member Function Documentation

◆ beginGatherStats()

virtual void Arcane::ITimeStats::beginGatherStats ( )
pure virtual

Starts time collection.

Implemented in Arcane::TimeStats.

◆ dumpCurrentStats()

virtual void Arcane::ITimeStats::dumpCurrentStats ( const String & name)
pure virtual

Displays statistics for an action.

Displays the statistics for action name as well as its sub-actions for the current iteration.

Implemented in Arcane::TimeStats.

Referenced by Arcane::TimeLoopMng::_doMeshPartition().

Here is the caller graph for this function:

◆ dumpStats()

virtual void Arcane::ITimeStats::dumpStats ( std::ostream & ostr,
bool is_verbose,
Real nb,
const String & name,
bool use_elapsed_time = false )
pure virtual

Displays execution time statistics.

It is possible to specify a value to get a time per iteration or per entity. If use_elapsed_time is true, it uses clock time; otherwise, it uses CPU time.

Implemented in Arcane::TimeStats.

◆ dumpStatsJSON()

virtual void Arcane::ITimeStats::dumpStatsJSON ( JSONWriter & writer)
pure virtual

Serializes the temporal statistics into the writer writer.

Implemented in Arcane::TimeStats.

◆ dumpTimeAndMemoryUsage()

virtual void Arcane::ITimeStats::dumpTimeAndMemoryUsage ( IParallelMng * pm)
pure virtual

Displays the current date and memory consumption.

This operation is collective on pm.

This operation displays the memory consumed for the current subdomain as well as the min and max for all subdomains.

Implemented in Arcane::TimeStats.

Referenced by Arcane::ArcaneInitialPartitioner::_mergeConstraints(), Arcane::mesh::DynamicMesh::endAllocate(), and Arcane::ArcaneInitialPartitioner::partitionAndDistributeMeshes().

Here is the caller graph for this function:

◆ elapsedTime() [1/2]

virtual Real Arcane::ITimeStats::elapsedTime ( eTimePhase phase)
pure virtual

Real elapsed time for phase phase.

Returns the real elapsed time (in seconds) for phase phase.

Implemented in Arcane::TimeStats.

◆ elapsedTime() [2/2]

virtual Real Arcane::ITimeStats::elapsedTime ( eTimePhase phase,
const String & action )
pure virtual

Elapsed time for a phase of an action.

Returns the real elapsed time (in seconds) for phase phase of action action. The returned time includes that of the action and all of its children.

Implemented in Arcane::TimeStats.

◆ endGatherStats()

virtual void Arcane::ITimeStats::endGatherStats ( )
pure virtual

Stops time collection.

Implemented in Arcane::TimeStats.

◆ isGathering()

virtual bool Arcane::ITimeStats::isGathering ( ) const
pure virtual

Indicates if statistics are active.

Statistics are active between the call to beginGatherStats() and endGatherStats().

Implemented in Arcane::TimeStats.

◆ metricCollector()

virtual ITimeMetricCollector * Arcane::ITimeStats::metricCollector ( )
pure virtual

Associated collection interface.

Implemented in Arcane::TimeStats.

Referenced by Arcane::ParallelMngDispatcher::setTimeStats(), and Arcane::ParallelMngDispatcher::timeMetricCollector().

Here is the caller graph for this function:

◆ notifyNewIterationLoop()

virtual void Arcane::ITimeStats::notifyNewIterationLoop ( )
pure virtual

Notifies that a new iteration of the calculation loop begins.

This information is used to calculate times per iteration.

Implemented in Arcane::TimeStats.

Referenced by Arcane::TimeLoopMng::doOneIteration().

Here is the caller graph for this function:

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