Coverage Report

Created: 2026-10-28 17:42

/home/runner/work/charm/charm/src/ck-ldb/LBMachineUtil.h
Line
Count
Source
1
/**
2
 * \addtogroup CkLdb
3
*/
4
/*@{*/
5
6
#ifndef _LDMACHINEUTIL_H_
7
#define _LDMACHINEUTIL_H_
8
9
class LBMachineUtil {
10
public:
11
  LBMachineUtil();
12
  void StatsOn();
13
  void StatsOff();
14
  void Clear();
15
  void TotalTime(LBRealType* walltime, LBRealType* cputime);
16
6.76k
  void IdleTime(LBRealType* walltime) { *walltime = total_idletime; };
17
18
private:
19
enum : uint8_t { off, on } state;
20
  LBRealType total_walltime;
21
  LBRealType total_idletime;
22
  double start_totalwall;
23
  double start_idle;
24
#if CMK_LB_CPUTIMER
25
  LBRealType total_cputime;
26
  double start_totalcpu;
27
#endif
28
29
  int cancel_idleStart, cancel_idleEnd;
30
31
  void IdleStart(double curWallTime);
32
  void IdleEnd(double curWallTime);
33
  static void staticIdleStart(LBMachineUtil *util);
34
  static void staticIdleEnd(LBMachineUtil *util);
35
};
36
37
#endif  // _LDMACHINEUTIL_H_
38
39
/*@}*/