extract MigrationMsg from all LB strategies.
[charm.git] / src / ck-ldb / LBMachineUtil.h
1 /*****************************************************************************
2  * $Source$
3  * $Author$
4  * $Date$
5  * $Revision$
6  *****************************************************************************/
7
8 /**
9  * \addtogroup CkLdb
10 */
11 /*@{*/
12
13 #ifndef _LDMACHINEUTIL_H_
14 #define _LDMACHINEUTIL_H_
15
16 #include "converse.h"
17
18 class LBMachineUtil {
19 public:
20   LBMachineUtil();
21   void StatsOn();
22   void StatsOff();
23   void Clear();
24   void TotalTime(double* walltime, double* cputime);
25   void IdleTime(double* walltime) { *walltime = total_idletime; };
26   void IdleStart();
27   void IdleEnd();
28   
29 private:
30   enum { off, on } state;
31   double total_walltime;
32   double total_cputime;
33   double total_idletime;
34   double start_totalwall;
35   double start_totalcpu;
36   double start_idle;
37
38   int cancel_idleStart, cancel_idleEnd;
39 };
40
41 #endif  // _LDMACHINEUTIL_H_
42
43 /*@}*/