Statistics on execution times. More...
#include <arcane/impl/TimeStats.h>
Classes | |
| struct | TimeValue |
| class | PhaseValue |
| class | MetricCollector |
| class | Action |
| Action. More... | |
| class | ActionSeries |
| Action series. More... | |
Public Types | |
| enum | eTimeType { TT_Real = 0 , TT_Virtual } |
| using | ActionList = List<Action*> |
Public Member Functions | |
| TimeStats (ITimerMng *timer_mng, ITraceMng *trm, const String &name) | |
| TimeStats (const TimeStats &rhs)=delete | |
| TimeStats & | operator= (const TimeStats &rhs)=delete |
| void | beginGatherStats () override |
| Starts time collection. | |
| void | endGatherStats () override |
| Stops time collection. | |
| void | beginAction (const String &action_name) override |
| void | endAction (const String &action_name, bool print_time) override |
| void | beginPhase (eTimePhase phase_type) override |
| void | endPhase (eTimePhase phase_type) override |
| Real | elapsedTime (eTimePhase phase) override |
| Real elapsed time for phase phase. | |
| Real | elapsedTime (eTimePhase phase, const String &action) override |
| Elapsed time for a phase of an action. | |
| void | dumpStats (std::ostream &ostr, bool is_verbose, Real nb, const String &name, bool use_elapsed_time) override |
| Displays execution time statistics. | |
| void | dumpCurrentStats (const String &action) override |
| Displays statistics for an action. | |
| void | dumpTimeAndMemoryUsage (IParallelMng *pm) override |
| Displays the current date and memory consumption. | |
| bool | isGathering () const override |
| Indicates if statistics are active. | |
| void | dumpStatsJSON (JSONWriter &writer) override |
| Serializes the temporal statistics into the writer writer. | |
| ITimeMetricCollector * | metricCollector () override |
| Associated collection interface. | |
| void | notifyNewIterationLoop () override |
| Notifies that a new iteration of the calculation loop begins. | |
| void | saveTimeValues (Properties *p) override |
| void | mergeTimeValues (Properties *p) override |
| void | resetStats (const String &name) override |
| Public Member Functions inherited from Arcane::TraceAccessor | |
| TraceAccessor (ITraceMng *m) | |
| Constructs an accessor via the trace manager m. | |
| TraceAccessor (const TraceAccessor &rhs) | |
| Copy constructor. | |
| TraceAccessor & | operator= (const TraceAccessor &rhs) |
| Copy assignment operator. | |
| virtual | ~TraceAccessor () |
| Frees resources. | |
| ITraceMng * | traceMng () const |
| Trace manager. | |
| TraceMessage | info () const |
| Flow for an information message. | |
| TraceMessage | pinfo () const |
| Flow for a parallel information message. | |
| TraceMessage | info (char category) const |
| Flow for an information message of a given category. | |
| TraceMessage | pinfo (char category) const |
| Flow for a parallel information message of a given category. | |
| TraceMessage | info (bool v) const |
| Flow for an information message. | |
| TraceMessage | warning () const |
| Flow for a warning message. | |
| TraceMessage | pwarning () const |
| TraceMessage | error () const |
| Flow for an error message. | |
| TraceMessage | perror () const |
| TraceMessage | log () const |
| Flow for a log message. | |
| TraceMessage | plog () const |
| Flow for a log message. | |
| TraceMessage | logdate () const |
| Flow for a log message preceded by the date. | |
| TraceMessage | fatal () const |
| Flow for a fatal error message. | |
| TraceMessage | pfatal () const |
| Flow for a parallel fatal error message. | |
| TraceMessageDbg | debug (Trace::eDebugLevel=Trace::Medium) const |
| Flow for a debug message. | |
| Trace::eDebugLevel | configDbgLevel () const |
| Debug level of the configuration file. | |
| TraceMessage | info (Int32 verbose_level) const |
| Flow for an information message of a given level. | |
| TraceMessage | linfo () const |
| Flow for an information message with the local information level of this instance. | |
| TraceMessage | linfo (Int32 relative_level) const |
| Flow for an information message with the local information level of this instance. | |
| void | fatalMessage (const StandaloneTraceMessage &o) const |
Static Public Attributes | |
| static const Integer | NB_TIME_TYPE = 2 |
| Number of eTimeType values. | |
| static const Integer | TC_Local = 0 |
| static const Integer | TC_Cumulative = 1 |
Private Member Functions | |
| Action * | _currentAction () |
| PhaseValue | _currentPhaseValue () |
| void | _checkGathering () |
| void | _computeCumulativeTimes () |
| void | _dumpCumulativeTime (std::ostream &ostr, Action &action, eTimePhase tp, eTimeType tt) |
| void | _dumpAllPhases (std::ostream &ostr, Action &action, eTimeType tt, int tc, Real nb) |
Private Attributes | |
| ITimerMng * | m_timer_mng = nullptr |
| Timer * | m_virtual_timer = nullptr |
| Timer * | m_real_timer = nullptr |
| bool | m_is_gathering = false |
| PhaseValue | m_current_phase |
| ActionSeries * | m_current_action_series = nullptr |
| Statistics on current execution. | |
| ActionSeries * | m_previous_action_series = nullptr |
| Statistics on previous executions. | |
| Action * | m_main_action = nullptr |
| Action * | m_current_action = nullptr |
| std::stack< eTimePhase > | m_phases_type |
| bool | m_need_compute_elapsed_time = false |
| std::ostringstream | m_full_stats_str |
| bool | m_full_stats = false |
| String | m_name |
| ITimeMetricCollector * | m_metric_collector = nullptr |
Additional Inherited Members | |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
Statistics on execution times.
Definition at line 37 of file TimeStats.h.
Definition at line 47 of file TimeStats.h.
| enum Arcane::TimeStats::eTimeType |
Definition at line 49 of file TimeStats.h.
Definition at line 260 of file TimeStats.cc.
|
override |
Definition at line 284 of file TimeStats.cc.
|
private |
Definition at line 818 of file TimeStats.cc.
|
private |
Definition at line 643 of file TimeStats.cc.
|
private |
Definition at line 783 of file TimeStats.cc.
|
private |
Definition at line 794 of file TimeStats.cc.
|
private |
Definition at line 676 of file TimeStats.cc.
|
overridevirtual |
Implements Arcane::ITimeStats.
Definition at line 358 of file TimeStats.cc.
|
overridevirtual |
Starts time collection.
Implements Arcane::ITimeStats.
Definition at line 299 of file TimeStats.cc.
References ARCANE_FATAL, Arcane::Timer::TimerReal, and Arcane::Timer::TimerVirtual.
|
overridevirtual |
Implements Arcane::ITimeStats.
Definition at line 395 of file TimeStats.cc.
|
overridevirtual |
Displays statistics for an action.
Displays the statistics for action name as well as its sub-actions for the current iteration.
Implements Arcane::ITimeStats.
Definition at line 535 of file TimeStats.cc.
References Arcane::TraceAccessor::info().
|
overridevirtual |
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.
Implements Arcane::ITimeStats.
Definition at line 517 of file TimeStats.cc.
References m_current_action_series, and m_previous_action_series.
|
overridevirtual |
Serializes the temporal statistics into the writer writer.
Implements Arcane::ITimeStats.
Definition at line 849 of file TimeStats.cc.
References m_current_action_series, and m_previous_action_series.
|
overridevirtual |
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.
Implements Arcane::ITimeStats.
Definition at line 840 of file TimeStats.cc.
References Arcane::MessagePassing::dumpDateAndMemoryUsage(), and Arcane::TraceAccessor::traceMng().
|
overridevirtual |
Real elapsed time for phase phase.
Returns the real elapsed time (in seconds) for phase phase.
Implements Arcane::ITimeStats.
Definition at line 426 of file TimeStats.cc.
|
overridevirtual |
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.
Implements Arcane::ITimeStats.
Definition at line 436 of file TimeStats.cc.
References Arcane::TraceAccessor::info().
|
overridevirtual |
Implements Arcane::ITimeStats.
Definition at line 374 of file TimeStats.cc.
|
overridevirtual |
Stops time collection.
Implements Arcane::ITimeStats.
Definition at line 323 of file TimeStats.cc.
References Arcane::String::localstr().
|
overridevirtual |
Implements Arcane::ITimeStats.
Definition at line 408 of file TimeStats.cc.
|
overridevirtual |
Indicates if statistics are active.
Statistics are active between the call to beginGatherStats() and endGatherStats().
Implements Arcane::ITimeStats.
Definition at line 830 of file TimeStats.cc.
|
overridevirtual |
Implements Arcane::ITimeStats.
Definition at line 1034 of file TimeStats.cc.
|
overridevirtual |
Associated collection interface.
Implements Arcane::ITimeStats.
Definition at line 1002 of file TimeStats.cc.
|
overridevirtual |
Notifies that a new iteration of the calculation loop begins.
This information is used to calculate times per iteration.
Implements Arcane::ITimeStats.
Definition at line 1066 of file TimeStats.cc.
References m_current_action_series.
|
overridevirtual |
Implements Arcane::ITimeStats.
Definition at line 553 of file TimeStats.cc.
|
overridevirtual |
Implements Arcane::ITimeStats.
Definition at line 1011 of file TimeStats.cc.
|
private |
Definition at line 163 of file TimeStats.h.
|
private |
Statistics on current execution.
Definition at line 159 of file TimeStats.h.
Referenced by dumpStats(), dumpStatsJSON(), and notifyNewIterationLoop().
|
private |
Definition at line 157 of file TimeStats.h.
|
private |
Definition at line 167 of file TimeStats.h.
|
private |
Definition at line 166 of file TimeStats.h.
|
private |
Definition at line 156 of file TimeStats.h.
|
private |
Definition at line 162 of file TimeStats.h.
|
private |
Definition at line 169 of file TimeStats.h.
|
private |
Definition at line 168 of file TimeStats.h.
|
private |
Definition at line 165 of file TimeStats.h.
|
private |
Definition at line 164 of file TimeStats.h.
|
private |
Statistics on previous executions.
Definition at line 161 of file TimeStats.h.
Referenced by dumpStats(), and dumpStatsJSON().
|
private |
Definition at line 155 of file TimeStats.h.
|
private |
Definition at line 153 of file TimeStats.h.
|
private |
Definition at line 154 of file TimeStats.h.
|
static |
Number of eTimeType values.
Definition at line 56 of file TimeStats.h.
Referenced by Arcane::TimeStats::Action::reset().
|
static |
Definition at line 59 of file TimeStats.h.
|
static |
Definition at line 58 of file TimeStats.h.