commit | b81b2b2bdae8ebf9ca1e3ec0f78cdd798ff3d1ac | [log] [tgz] |
---|---|---|
author | Viet-Trung Luu <viettrungluu@chromium.org> | Wed Jul 13 20:53:35 2016 |
committer | Viet-Trung Luu <viettrungluu@chromium.org> | Wed Jul 13 20:53:35 2016 |
tree | bf37426d3d745ace26b349f307df89b14ffac57f | |
parent | be07565c6eb104257fd4765e4562ce3773704b7d [diff] |
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 Review URL: https://codereview.chromium.org/2141083003 . Cr-Mirrored-From: https://github.com/domokit/mojo Cr-Mirrored-Commit: d07817c5dc1a8c146bad01d1877dd8c57c54baba
The Mojo Public API is a binary stable API to the Mojo system.
It consists of support for a number of programming languages (with a directory for each support language), some “build” tools and build-time requirements, and interface definitions for Mojo services (specified using an IDL).
Note that there are various subdirectories named tests/. These contain tests of the code in the enclosing directory, and are not meant for use by Mojo applications.
The c/, cpp/, js/ subdirectories define the API for C, C++, and JavaScript, respectively.
The basic principle for these directories is that they consist of the source files that one needs at build/deployment/run time (as appropriate for the language), organized in a natural way for the particular language.
The interfaces/ subdirectory contains Mojo IDL (a.k.a. .mojom) descriptions of standard Mojo services.
The platform/ subdirectory contains any build-time requirements (e.g., static libraries) that may be needed to produce a Mojo application for certain platforms, such as a native shared library or as a NaCl binary.
The tools/ subdirectory contains tools that are useful/necessary at build/deployment time. These tools may be needed (as a practical necessity) to use the API in any given language, e.g., to generate bindings from Mojo IDL files.