18.03.2013 - Bug fixes, add in/out speed diagnostic to PIProtocol, fixed PIConsole tab switch segfault, PIObject EVENT / EVENT_HANDLER mechanism update - new EVENT macros that use EVENT_HANDLER with raiseEvent implementation.
This allow compile check event for CONNECT and use EVENT as CONNECT target, also raise event now is simple execute EVENT function.
This commit is contained in:
14
pisystemmonitor.h
Executable file → Normal file
14
pisystemmonitor.h
Executable file → Normal file
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
Process resource monitor
|
||||
Copyright (C) 2012 Ivan Pelipenko peri4ko@gmail.com
|
||||
Copyright (C) 2013 Ivan Pelipenko peri4ko@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -27,7 +27,7 @@ class PISystemMonitor: public PIThread
|
||||
{
|
||||
public:
|
||||
PISystemMonitor();
|
||||
|
||||
|
||||
struct ProcessStats {
|
||||
PIString exec_name;
|
||||
PIString state;
|
||||
@@ -50,21 +50,21 @@ public:
|
||||
float cpu_load_system;
|
||||
float cpu_load_user;
|
||||
};
|
||||
|
||||
|
||||
bool startOnProcess(int pID);
|
||||
bool startOnSelf() {return startOnProcess(PIProcess::currentPID());}
|
||||
ProcessStats & statistic() {return stat;}
|
||||
|
||||
const ProcessStats & statistic() const {return stat;}
|
||||
|
||||
private:
|
||||
void run();
|
||||
|
||||
|
||||
PIFile file, filem;
|
||||
ProcessStats stat;
|
||||
int pID_, page_size, cpu_count, cycle;
|
||||
#ifndef WINDOWS
|
||||
llong cpu_u_cur, cpu_u_prev, cpu_s_cur, cpu_s_prev;
|
||||
#endif
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // PISYSTEMMONITOR_H
|
||||
|
||||
Reference in New Issue
Block a user