ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
timeStats.h
Go to the documentation of this file.
1//
2// ,---. ,--, .---. ,--, ,---. .-. .-.
3// | .-' .' .') / .-. ) .' .' | .-' | \| |
4// | `-. | |(_) | | |(_) | | __ | `-. | | |
5// | .-' \ \ | | | | \ \ ( _) | .-' | |\ |
6// | `--. \ `-. \ `-' / \ `-) ) | `--. | | |)|
7// /( __.' \____\ )---' )\____/ /( __.' /( (_)
8// (__) (_) (__) (__) (__)
9// Official webSite: https://code-mphi.github.io/ECOGEN/
10//
11// This file is part of ECOGEN.
12//
13// ECOGEN is the legal property of its developers, whose names
14// are listed in the copyright file included with this source
15// distribution.
16//
17// ECOGEN is free software: you can redistribute it and/or modify
18// it under the terms of the GNU General Public License as published
19// by the Free Software Foundation, either version 3 of the License,
20// or (at your option) any later version.
21//
22// ECOGEN is distributed in the hope that it will be useful,
23// but WITHOUT ANY WARRANTY; without even the implied warranty of
24// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25// GNU General Public License for more details.
26//
27// You should have received a copy of the GNU General Public License
28// along with ECOGEN (file LICENSE).
29// If not, see <http://www.gnu.org/licenses/>.
30
31#ifndef TIMESTATS_H
32#define TIMESTATS_H
33
34#include <iostream>
35#include <string>
36#include <mpi.h>
37#include <cmath>
38
40{
41 public:
42 timeStats();
43 ~timeStats();
44
45 void initialize();
47
48 void startAMRTime();
49 void endAMRTime();
50
53
54 void startIOTime();
55 void endIOTime();
56
57 void setCompTime(const double& compTime, const double& AMRTime, const double& comTime, const double& IOTime);
58 double getComputationTime() const { return m_computationTime; };
59 double getAMRTime() const { return m_AMRTime; };
60 double getCommunicationTime() const { return m_communicationTime; };
61 double getIOTime() const { return m_IOTime; };
62 void printScreenStats(const int& numTest) const;
63 void printScreenTime(const double& time, std::string chaine, const int& numTest) const;
64
65 private:
66 //Time analysis - Attributes are stored in seconds
67 // clang-format off
70
72 double m_AMRTime;
73
76
78 double m_IOTime;
79
80 // clang-format on
81};
82
83#endif // TIMESTATS_H
void initialize()
Definition timeStats.cpp:43
double m_IOTime
IO time among compuational time.
Definition timeStats.h:78
void printScreenTime(const double &time, std::string chaine, const int &numTest) const
Definition timeStats.cpp:135
void endIOTime()
Definition timeStats.cpp:103
double getCommunicationTime() const
Definition timeStats.h:60
void startAMRTime()
Definition timeStats.cpp:63
~timeStats()
Definition timeStats.cpp:39
double getComputationTime() const
Definition timeStats.h:58
double m_computationTime
Computational time.
Definition timeStats.h:69
void printScreenStats(const int &numTest) const
Definition timeStats.cpp:121
double m_IORefTime
Definition timeStats.h:77
double m_AMRRefTime
Definition timeStats.h:71
double m_InitialTime
Definition timeStats.h:68
double m_communicationTime
Communication time among computational time.
Definition timeStats.h:75
void endCommunicationTime()
Definition timeStats.cpp:87
double m_communicationRefTime
Definition timeStats.h:74
void setCompTime(const double &compTime, const double &AMRTime, const double &comTime, const double &IOTime)
Definition timeStats.cpp:111
void startCommunicationTime()
Definition timeStats.cpp:79
void updateComputationTime()
Definition timeStats.cpp:55
double m_AMRTime
AMR time among computational time.
Definition timeStats.h:72
void endAMRTime()
Definition timeStats.cpp:71
timeStats()
Definition timeStats.cpp:35
double getAMRTime() const
Definition timeStats.h:59
void startIOTime()
Definition timeStats.cpp:95
double getIOTime() const
Definition timeStats.h:61