Add synthetic delay testing framework
commitf9c2e35ba2bc568bfefdd74e556353a77933b1c8
authorskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 3 Jan 2014 22:37:39 +0000 (3 22:37 +0000)
committerskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 3 Jan 2014 22:37:39 +0000 (3 22:37 +0000)
tree98b5e71ed65abe0c38151d8419ffc5e3253c5086
parent608daa4e2a187e9ca49d2a39de05eda98d243544
Add synthetic delay testing framework

This patch introduces a synthetic delay framework for testing. It will be used to measure animation smoothness and input latency under varying loads in different parts of the graphics and input pipelines.

The basic building block for synthetic delays is the delay point which is inserted to a function scope of interest, e.g.:

    TRACE_EVENT_SYNTHETIC_DELAY("cc.DrawAndSwap");

Testing code can then configure how long the enclosing scope of the delay point should take to execute. If the function completes faster than the configured duration, a busy loop is used to make up the difference.

BUG=307841,324057

Review URL: https://codereview.chromium.org/53923005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242947 0039d316-1c4b-4281-b951-d872f2087c98
base/base.gyp
base/base.gypi
base/debug/trace_event_synthetic_delay.cc [new file with mode: 0644]
base/debug/trace_event_synthetic_delay.h [new file with mode: 0644]
base/debug/trace_event_synthetic_delay_unittest.cc [new file with mode: 0644]