Permalink
Browse files

Dont log processed clients if list is empty

Summary:
We have a lot of log spam for an empty list. Every second we have an
event logged.

This skips logging if the list is empty.

Reviewed By: dabek

Differential Revision: D5752922

fbshipit-source-id: 777d4dd510fd6bd57db26eb7dd105434884a7338
  • Loading branch information...
alexchow authored and hhvm-bot committed Sep 8, 2017
1 parent 52e4823 commit 55c3ff64103bd069e257b4f542e30e6fecfbc3e0
Showing with 2 additions and 1 deletion.
  1. +2 −1 hphp/hack/src/watchman_event_watcher/watchmanEventWatcher.ml
@@ -243,7 +243,8 @@ let check_new_connections env =
let new_clients = get_new_clients env.socket in
let env = List.fold_left new_clients ~init:env
~f:process_client in
HackEventLogger.processed_clients (List.length new_clients);
let count = List.length new_clients in
if count > 0 then HackEventLogger.processed_clients count;
env
let rec serve env =

0 comments on commit 55c3ff6

Please sign in to comment.