@ -4,6 +4,10 @@
"ostream": "cpp",
"string": "cpp",
"vector": "cpp",
"map": "cpp"
"map": "cpp",
"*.tcc": "cpp",
"deque": "cpp",
"unordered_map": "cpp",
"system_error": "cpp"
}
@ -54,6 +54,17 @@ class Metrics {
*/
vector<string> keys();
/**
* Metoda vraća map<string, uint> svih mjerenja
map<string, uint> get_data();
* Metoda vraća map<string, uint> svih mjerenja i resetira brojače
map<string, uint> get_data_and_clear();
};
@ -22,3 +22,14 @@ vector<string> marcelb::Metrics::keys() {
return _keys;
map<string, uint> marcelb::Metrics::get_data() {
return counters;
map<string, uint> marcelb::Metrics::get_data_and_clear() {
auto data = counters;
clear();
@ -17,5 +17,6 @@ int main() {
cout << " access " << metrika["access"] << endl;
return 0;