Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Issue 2141083003: Add a perf test for async wait and fix a bug in mojo::RunLoop. (Closed)

Created:
4 years, 5 months ago by viettrungluu
Modified:
4 years, 5 months ago
Reviewers:
vardhan
CC:
mojo-reviews_chromium.org, gregsimon, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, yzshen+mojopublicwatch_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Add 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+267 lines, -2 lines) Patch
M mojo/BUILD.gn View 2 chunks +8 lines, -0 lines 0 comments Download
A mojo/public/c/environment/tests/BUILD.gn View 1 chunk +20 lines, -0 lines 0 comments Download
A mojo/public/c/environment/tests/async_waiter_perftest_helpers.h View 1 chunk +32 lines, -0 lines 0 comments Download
A mojo/public/c/environment/tests/async_waiter_perftest_helpers.cc View 1 chunk +136 lines, -0 lines 0 comments Download
M mojo/public/c/system/tests/perftest_utils.h View 1 chunk +0 lines, -2 lines 0 comments Download
M mojo/public/cpp/environment/tests/BUILD.gn View 1 chunk +20 lines, -0 lines 0 comments Download
A mojo/public/cpp/environment/tests/run_loop_async_wait_perftest.cc View 1 1 chunk +47 lines, -0 lines 0 comments Download
M mojo/public/cpp/utility/lib/run_loop.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/tools/get_test_list.py View 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 6 (2 generated)
viettrungluu
4 years, 5 months ago (2016-07-12 21:18:35 UTC) #2
viettrungluu
ping
4 years, 5 months ago (2016-07-13 17:55:25 UTC) #3
vardhan
lgtm
4 years, 5 months ago (2016-07-13 19:15:30 UTC) #4
viettrungluu
4 years, 5 months ago (2016-07-13 20:53:42 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
d07817c5dc1a8c146bad01d1877dd8c57c54baba (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698