| 57 | } |
| 58 | |
| 59 | shared_ptr<TimeSeries> TimeSeriesCollector::GetTimeSeries(const string& key) { |
| 60 | MutexLock l(series_lock_); |
| 61 | SeriesMap::const_iterator it = series_map_.find(key); |
| 62 | if (it != series_map_.end()) { |
| 63 | return (*it).second; |
| 64 | } |
| 65 | |
| 66 | auto ts(std::make_shared<TimeSeries>()); |
| 67 | series_map_[key] = ts; |
| 68 | return ts; |
| 69 | } |
| 70 | |
| 71 | void TimeSeriesCollector::StartDumperThread() { |
| 72 | LOG(INFO) << "Starting metrics dumper"; |