Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* IOChrono.h
*
* Created on: Mar 9, 2017
* Author: William F Godoy godoywf@ornl.gov
*/
#ifndef ADIOS2_TOOLKIT_PROFILING_IOCHRONO_IOCHRONO_H_
#define ADIOS2_TOOLKIT_PROFILING_IOCHRONO_IOCHRONO_H_
/// \cond EXCLUDE_FROM_DOXYGEN
#include <unordered_map>
#include <vector>
/// \endcond
#include "adios2/ADIOSConfig.h"
#include "adios2/toolkit/profiling/iochrono/Timer.h"
namespace adios
{
namespace profiling
{
/**
* Struct used to track
*/
struct IOChrono
{
/**
* Create timers for each process
* <pre>
* Key: process name
* Value: see Timer class public API, use to track process time as a
* chronometer with Resume() and Pause() functions
* </pre>
*/
std::unordered_map<std::string, Timer> Timers;
/** Create byte tracking counter for each process*/
std::unordered_map<std::string, size_t> Bytes;
/** flag to determine if IOChrono object is used */
bool IsActive = true;
};
} // end namespace profiling
} // end namespace adios
#endif /* ADIOS2_CORE_IOCHRONO_H_ */