logging: improve the AsyncFileWriterTest discard test
Summary: This improves the test that exercises the AsyncFileWriter message discarding logic. Previously each writer thread wrote a fixed number of small messages. This was fairly slow, and wasn't always guaranteed to reliably produce discards. Now each writer thread writes larger messages, which produce discards faster. The test also automatically stops after 10 separate discard events, so that it finishes faster (typically a few hundred milliseconds, rather than 5+ seconds). This also updates the test to use XLOG() internally rather than using fprintf() to print to stderr, now that the XLOG() diffs have landed. Reviewed By: wez Differential Revision: D5261059 fbshipit-source-id: 120224706fee36948ef76efbeb579ccc56400c51
Showing
This diff is collapsed.
Please register or sign in to comment