|
7 | 7 | #include "include/GUTimer.h" /*Timers: time_h, rdtsc, chrono_hr, ctime, LOFAR_timer*/
|
8 | 8 | #include <unistd.h>
|
9 | 9 |
|
10 |
| -//typedef long DWORD; //4bytes |
11 |
| -//template <typename Word> |
12 |
| -//std::ifstream& read_word( std::ifstream& ins, Word& value ); |
13 |
| - |
14 |
| -// |
15 |
| -//std::string |
16 |
| -//getFileContent(const std::string& path) |
17 |
| -//{ |
18 |
| -// GUTimer t(GUTimer::chrono_hr);// GUTimer t(GUTimer::time_h) |
19 |
| -// GUTimer t1(GUTimer::chrono_hr);// GUTimer t(GUTimer::time_h) |
20 |
| -// t.start(); |
21 |
| -// std::ifstream file(path,std::ifstream::binary); |
22 |
| -// t.stop(); |
23 |
| -//// DWORD word1; |
24 |
| -//// DWORD word2; |
25 |
| -// |
26 |
| -// t1.start(); |
27 |
| -// |
28 |
| -//// std::string content((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>()); |
29 |
| -// file.seekg(7); //rchar |
30 |
| -// char * result= new char [70]; |
31 |
| -// file.read(result,70); |
32 |
| -// // |
33 |
| -//// file.seekg(238); //VMpeak |
34 |
| -//// file.read((char*)&word1,sizeof(long)-1); //VMpeak (+-1 byte)// |
35 |
| -//// file.seekg(258); //VMsize |
36 |
| -//// file.read((char*)&word1,sizeof(long)-1); //VMsize (+-1 byte) |
37 |
| -//// |
38 |
| -//// |
39 |
| -//// file.close(); |
40 |
| -// t1.stop(); |
41 |
| -//// std::stringstream stream; stream << std::hex << word1; |
42 |
| -//// std::string result( stream.str() ); |
43 |
| -// std::cout<<t.getElapsed()<<" "<<t1.getElapsed()<<"\n"; |
44 |
| -// std::cout<<"$samp "<<result<<'\n'; |
45 |
| -//// delete[] result; |
46 |
| -// |
47 |
| -// return ""; |
48 |
| -//} |
49 |
| - |
50 |
| - |
51 |
| - |
52 |
| - |
53 |
| - |
54 |
| - |
55 |
| - |
56 |
| - |
57 |
| - |
58 |
| - |
59 |
| - |
60 |
| - |
61 |
| - |
62 |
| - |
63 |
| - |
64 |
| - |
65 | 10 | //=============
|
66 | 11 | //=============
|
67 | 12 |
|
@@ -184,6 +129,7 @@ int main(int argc, char *argv[]) {
|
184 | 129 | struct tm * now = localtime( & t );
|
185 | 130 | std::cout <<"$Start time "<< (now->tm_hour)<<":"<<(now->tm_min)<<":"<<(now->tm_sec) << std::endl;
|
186 | 131 |
|
| 132 | + |
187 | 133 | while(exists("/proc/"+pid_s+"/exe"))
|
188 | 134 | {
|
189 | 135 | printf(("$proc-io "+getio("/proc/"+pid_s+"/io")).c_str());
|
|
0 commit comments