| 84 | } |
| 85 | |
| 86 | void TimeSeriesCollector::DumperThread() { |
| 87 | CHECK(started_); |
| 88 | WallTime start_time = WallTime_Now(); |
| 89 | |
| 90 | faststring metrics_str; |
| 91 | while (true) { |
| 92 | metrics_str.clear(); |
| 93 | metrics_str.append("metrics: "); |
| 94 | BuildMetricsString(WallTime_Now() - start_time, &metrics_str); |
| 95 | LOG(INFO) << metrics_str.ToString(); |
| 96 | |
| 97 | // Sleep until next dump time, or return if we should exit |
| 98 | if (exit_latch_.WaitFor(MonoDelta::FromMilliseconds(250))) { |
| 99 | return; |
| 100 | } |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | void TimeSeriesCollector::BuildMetricsString( |
| 105 | WallTime time_since_start, faststring* dst_buf) const { |
no test coverage detected