arc: Reduce overhead for capturing sys metrics.
Stress test shows that reading file from scratch is 1.6x slower than rewinding the existing file descriptor and reading again. This adopts this finding by re-using file descriptor for reading system stats. TEST=Locally on eve, minnie, functionality works, no error is reported. Additionally did perf inverstigation of ReadSystemStatOnBackgroundThread 10%/50%/90% mcs per invocation eve: before: 444/1049/1509 after: 305/688/721 minnie: before: 309/534/1441 after: 176/385/1033 BUG=b:140939504 Change-Id: I58ebb08299c43b58687eaaa6c9ad225872b2e70d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1823722 Commit-Queue: Yury Khmel <khmel@chromium.org> Reviewed-by:Xiyuan Xia <xiyuan@chromium.org> Cr-Commit-Position: refs/heads/master@{#699947}
Showing
This diff is collapsed.
Please register or sign in to comment