| 61 | } |
| 62 | |
| 63 | int redis_monitor::check(const std::map<acl::string, acl::string>& info, |
| 64 | const char* name, std::vector<int>& res) |
| 65 | { |
| 66 | std::map<acl::string, acl::string>::const_iterator cit |
| 67 | = info.find(name); |
| 68 | if (cit == info.end()) { |
| 69 | logger_error("no %s", name); |
| 70 | res.push_back(0); |
| 71 | return 0; |
| 72 | } else { |
| 73 | int n = atoi(cit->second.c_str()); |
| 74 | res.push_back(n); |
| 75 | return n; |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | long long redis_monitor::check(const std::map<acl::string, acl::string>& info, |
| 80 | const char* name, std::vector<long long>& res) |