Gs Cache Metrics: read from pipe in realtime
Before the change, the script could start to read until the input file
handler get closed. With this change, it can read while another process
is still writing.
BUG=None
TEST=Ran below shell command and verify that the script was reading
while the sub-shell writing.
(echo abc; sleep 3; echo xyz) | ./bin/gs_cache_nginx_metrics -i -
Change-Id: I03f51fc8e8cb2ad1114d674494ffdfb3aa25d4e6
Reviewed-on: https://chromium-review.googlesource.com/1453025
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Congbin Guo <guocb@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
1 file changed