| 171 | } |
| 172 | |
| 173 | void MetastoreEventMetrics::refresh(TEventProcessorMetrics* response) { |
| 174 | if (!response) { |
| 175 | LOG(ERROR) |
| 176 | << "Received a null response when trying to refresh metastore event metrics"; |
| 177 | return; |
| 178 | } |
| 179 | EVENT_PROCESSOR_STATUS->SetValue(response->status.c_str()); |
| 180 | |
| 181 | if (response->__isset.events_received) { |
| 182 | NUM_EVENTS_RECEIVED_COUNTER->SetValue(response->events_received); |
| 183 | } |
| 184 | if (response->__isset.events_skipped) { |
| 185 | NUM_EVENTS_SKIPPED_COUNTER->SetValue(response->events_skipped); |
| 186 | } |
| 187 | if (response->__isset.events_fetch_duration_mean) { |
| 188 | EVENTS_FETCH_DURATION_MEAN->SetValue(response->events_fetch_duration_mean); |
| 189 | } |
| 190 | if (response->__isset.events_fetch_duration_p75) { |
| 191 | EVENTS_FETCH_DURATION_P75->SetValue(response->events_fetch_duration_p75); |
| 192 | } |
| 193 | if (response->__isset.events_fetch_duration_p95) { |
| 194 | EVENTS_FETCH_DURATION_P95->SetValue(response->events_fetch_duration_p95); |
| 195 | } |
| 196 | if (response->__isset.events_fetch_duration_p99) { |
| 197 | EVENTS_FETCH_DURATION_P99->SetValue(response->events_fetch_duration_p99); |
| 198 | } |
| 199 | if (response->__isset.last_events_fetch_duration) { |
| 200 | EVENTS_FETCH_LAST_DURATION->SetValue(response->last_events_fetch_duration); |
| 201 | } |
| 202 | if (response->__isset.events_process_duration_mean) { |
| 203 | EVENTS_PROCESS_DURATION_MEAN->SetValue(response->events_process_duration_mean); |
| 204 | } |
| 205 | if (response->__isset.events_process_duration_p75) { |
| 206 | EVENTS_PROCESS_DURATION_P75->SetValue(response->events_process_duration_p75); |
| 207 | } |
| 208 | if (response->__isset.events_process_duration_p95) { |
| 209 | EVENTS_PROCESS_DURATION_P95->SetValue(response->events_process_duration_p95); |
| 210 | } |
| 211 | if (response->__isset.events_process_duration_p99) { |
| 212 | EVENTS_PROCESS_DURATION_P99->SetValue(response->events_process_duration_p99); |
| 213 | } |
| 214 | if (response->__isset.last_events_process_duration) { |
| 215 | EVENTS_PROCESS_LAST_DURATION->SetValue(response->last_events_process_duration); |
| 216 | } |
| 217 | if (response->__isset.events_received_1min_rate) { |
| 218 | EVENTS_RECEIVED_1MIN_RATE->SetValue(response->events_received_1min_rate); |
| 219 | } |
| 220 | if (response->__isset.events_received_5min_rate) { |
| 221 | EVENTS_RECEIVED_5MIN_RATE->SetValue(response->events_received_1min_rate); |
| 222 | } |
| 223 | if (response->__isset.events_received_15min_rate) { |
| 224 | EVENTS_RECEIVED_15MIN_RATE->SetValue(response->events_received_15min_rate); |
| 225 | } |
| 226 | if (response->__isset.last_synced_event_id) { |
| 227 | LAST_SYNCED_EVENT_ID->SetValue(response->last_synced_event_id); |
| 228 | } |
| 229 | if (response->__isset.last_synced_event_time) { |
| 230 | LAST_SYNCED_EVENT_TIME->SetValue(response->last_synced_event_time); |
no test coverage detected