diff options
author | reveman <reveman@chromium.org> | 2014-11-17 21:06:25 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-18 05:06:55 +0000 |
commit | 63294bc251336f3e59240642676a5e758a8c2192 (patch) | |
tree | 5c731eeeb6b068569ddb7663088879603ea3ca8e /gpu/command_buffer/tests | |
parent | c5f6d71b4626ab6dea845eb6dbb811829588155f (diff) | |
download | chromium_src-63294bc251336f3e59240642676a5e758a8c2192.zip chromium_src-63294bc251336f3e59240642676a5e758a8c2192.tar.gz chromium_src-63294bc251336f3e59240642676a5e758a8c2192.tar.bz2 |
cc: Add UMA stats for texture copy latency.
Records the time between the issue of a texture copy operation and
detecting that it has completed as measured by the GPU process.
This data is useful to determine potential driver problems related
to fences. Consistent high latency (200ms and above) for copy
operations is a strong indication of a misbehaving fence extension.
The data can also be used to determine the amount of staging
resources to use for optimal performance.
BUG=431845
Review URL: https://codereview.chromium.org/733053005
Cr-Commit-Position: refs/heads/master@{#304562}
Diffstat (limited to 'gpu/command_buffer/tests')
-rw-r--r-- | gpu/command_buffer/tests/gl_query_unittest.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gpu/command_buffer/tests/gl_query_unittest.cc b/gpu/command_buffer/tests/gl_query_unittest.cc index 0104430..5ea7e8d 100644 --- a/gpu/command_buffer/tests/gl_query_unittest.cc +++ b/gpu/command_buffer/tests/gl_query_unittest.cc @@ -63,7 +63,7 @@ TEST_F(QueryTest, MultipleQueries) { glGetQueryObjectuivEXT(commands_issue_query, GL_QUERY_RESULT_EXT, &result); // Sanity check - the resulting delta is shorter than the time it took to // run this test. - EXPECT_LT(result, base::TimeDelta(after - before).InMicroseconds()); + EXPECT_LE(result, base::TimeDelta(after - before).InMicroseconds()); result = 0; available = 0; @@ -152,6 +152,8 @@ TEST_F(QueryTest, CommandsCompleted) { return; } + base::TimeTicks before = base::TimeTicks::HighResNow(); + GLuint query; glGenQueriesEXT(1, &query); glBeginQueryEXT(GL_COMMANDS_COMPLETED_CHROMIUM, query); @@ -161,7 +163,12 @@ TEST_F(QueryTest, CommandsCompleted) { glFlush(); GLuint result = 0; glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_EXT, &result); - EXPECT_EQ(0u, result); + + base::TimeTicks after = base::TimeTicks::HighResNow(); + // Sanity check - the resulting delta is shorter than the time it took to + // run this test. + EXPECT_LE(result, base::TimeDelta(after - before).InMicroseconds()); + glDeleteQueriesEXT(1, &query); GLTestHelper::CheckGLError("no errors", __LINE__); } |