-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMonitoring.h
27 lines (19 loc) · 833 Bytes
/
Monitoring.h
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
////////////////////////////////////////////////////////////////////////////////////
// Copyright © Charalambos "Charis" Poullis, [email protected] //
// This work can only be used under an exclusive license of the author. //
////////////////////////////////////////////////////////////////////////////////////
#ifndef __MONITORING_H__
#define __MONITORING_H__
#include <map>
#include <string>
using namespace std;
///Keeps track of which functions are used and how many times
static std::map<std::string, int> functions_used;
static void printFunctionsUsed() {
std::map<std::string, int>::iterator it = functions_used.begin();
for (;it != functions_used.end();it++) {
std::cout << it->first << " => " << it->second << std::endl;
}
return;
}
#endif // __MONITORING_H__