hydra-queue-runner: Keep some notification statistics
[?]
Jul 24, 2017, 2:26 PM
JPHDKOMJEDZQYRACBIJ57SJME7IZNLDJY7RB6QR47KG7IL3PG7UACDependencies
- [2]
SL3WSRAChydra-queue-runner: Limit memory usage - [*]
24BMQDZAStart of single-process hydra-queue-runner - [*]
IE2PRAQUhydra-queue-runner: Send build notifications - [*]
HJOEIMLRRefactor - [*]
BRAESISHWarn if PostgreSQL appears stalled
Change contents
- edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 487
MaintainCount mc(nrNotificationsInProgress); - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 492
auto now1 = std::chrono::steady_clock::now(); - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 520
auto now2 = std::chrono::steady_clock::now();nrNotificationTimeMs += std::chrono::duration_cast<std::chrono::milliseconds>(now2 - now1).count();nrNotificationsDone++; - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 526
nrNotificationsFailed++; - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 602
root.attr("nrNotificationsDone", nrNotificationsDone);root.attr("nrNotificationsFailed", nrNotificationsFailed);root.attr("nrNotificationsInProgress", nrNotificationsInProgress);root.attr("nrNotificationsPending", notificationSenderQueue.lock()->size());root.attr("nrNotificationTimeMs", nrNotificationTimeMs);uint64_t nrNotificationsTotal = nrNotificationsDone + nrNotificationsFailed;root.attr("nrNotificationTimeAvgMs", nrNotificationsTotal == 0 ? 0.0 : (float) nrNotificationTimeMs / nrNotificationsTotal); - edit in src/hydra-queue-runner/state.hh at line 337[7.910][6.6084]
counter nrNotificationsDone{0};counter nrNotificationsFailed{0};counter nrNotificationsInProgress{0};counter nrNotificationTimeMs{0};