DescriptionAdd a perf test for async wait and fix a bug in mojo::RunLoop.
I forgot to remove entries from the wait set in mojo::RunLoop (since
handlers are always one-shot).
I added a perftest for async waiting using mojo::RunLoop and the
standalone Environment. The code is factored in a way so that it'd be
straightforward to also test other Environment implementations and
message loops (e.g., base::MessageLoop, with MessagePumpMojo or
otherwise).
To do (separately): We should probably support persistent handle
watching and persistent async waiting.
Results for the old (non-wait set) RunLoop:
RunLoopAsyncWaitPerftest.SingleThreaded/1 1.38095e+06 callbacks/second
RunLoopAsyncWaitPerftest.SingleThreaded/10 651786 callbacks/second
RunLoopAsyncWaitPerftest.SingleThreaded/100 106843 callbacks/second
RunLoopAsyncWaitPerftest.SingleThreaded/1000 9357 callbacks/second
RunLoopAsyncWaitPerftest.SingleThreaded/10000 1231 callbacks/second
Results for the new (wait set) RunLoop:
RunLoopAsyncWaitPerftest.SingleThreaded/1 939553 callbacks/second
RunLoopAsyncWaitPerftest.SingleThreaded/10 865503 callbacks/second
RunLoopAsyncWaitPerftest.SingleThreaded/100 784519 callbacks/second
RunLoopAsyncWaitPerftest.SingleThreaded/1000 706379 callbacks/second
RunLoopAsyncWaitPerftest.SingleThreaded/10000 551717 callbacks/second
(Measurements done haphazardly using a Release build on my Z620.)
R=vardhan@google.com
Committed: https://chromium.googlesource.com/external/mojo/+/d07817c5dc1a8c146bad01d1877dd8c57c54baba
Patch Set 1 #Patch Set 2 : oops #
Dependent Patchsets: Messages
Total messages: 6 (2 generated)
|