ECOGEN 4.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 <ctime>
36#include <string>
37#include <mpi.h>
38
40{
41 public:
42 timeStats();
43 ~timeStats();
44
45 void initialize();
47
48 void startAMRTime();
49 void endAMRTime();
50
53
54 void setCompTime(const clock_t& compTime, const clock_t& AMRTime, const clock_t& comTime);
55 clock_t getComputationTime() const { return m_computationTime; };
56 clock_t getAMRTime() const { return m_AMRTime; };
57 clock_t getCommunicationTime() const { return m_communicationTime; };
58 void printScreenStats(const int& numTest) const;
59 void printScreenTime(const clock_t& time, std::string chaine, const int& numTest) const;
60
61 private:
62 //Time analysis - Attributes are stored in miliseconds (to be divided by CLOCKS_PER_SEC)
65
66 clock_t m_AMRRefTime;
67 clock_t m_AMRTime;
68
71
72};
73
74#endif // TIMESTATS_H
Definition timeStats.h:40
clock_t getCommunicationTime() const
Definition timeStats.h:57
void initialize()
Definition timeStats.cpp:43
void startAMRTime()
Definition timeStats.cpp:61
clock_t getAMRTime() const
Definition timeStats.h:56
clock_t m_AMRTime
AMR time among computational time.
Definition timeStats.h:67
~timeStats()
Definition timeStats.cpp:39
void printScreenStats(const int &numTest) const
Definition timeStats.cpp:102
clock_t m_communicationRefTime
Definition timeStats.h:69
void endCommunicationTime()
Definition timeStats.cpp:85
void startCommunicationTime()
Definition timeStats.cpp:77
clock_t m_AMRRefTime
Definition timeStats.h:66
void updateComputationTime()
Definition timeStats.cpp:53
void setCompTime(const clock_t &compTime, const clock_t &AMRTime, const clock_t &comTime)
Definition timeStats.cpp:93
void endAMRTime()
Definition timeStats.cpp:69
timeStats()
Definition timeStats.cpp:35
clock_t getComputationTime() const
Definition timeStats.h:55
void printScreenTime(const clock_t &time, std::string chaine, const int &numTest) const
Definition timeStats.cpp:115
clock_t m_computationTime
Computational time.
Definition timeStats.h:64
clock_t m_InitialTime
Definition timeStats.h:63
clock_t m_communicationTime
Communication time among computational time.
Definition timeStats.h:70