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

Side by Side Diff: chrome/browser/extensions/api/tab_capture/tab_capture_performancetest.cc

Issue 1143723003: Update TabCapturePerformanceTest to more accurately time captures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/media/capture/content_video_capture_device_core.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/test/trace_event_analyzer.h" 8 #include "base/test/trace_event_analyzer.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "chrome/browser/extensions/extension_apitest.h" 10 #include "chrome/browser/extensions/extension_apitest.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 bool gpu_frames = PrintResults( 198 bool gpu_frames = PrintResults(
199 analyzer.get(), 199 analyzer.get(),
200 test_name, 200 test_name,
201 "RenderWidget::didCommitAndDrawCompositorFrame", 201 "RenderWidget::didCommitAndDrawCompositorFrame",
202 "ms"); 202 "ms");
203 EXPECT_TRUE(gpu_frames); 203 EXPECT_TRUE(gpu_frames);
204 204
205 // This prints out the average time between capture events. 205 // This prints out the average time between capture events.
206 // As the capture frame rate is capped at 30fps, this score 206 // As the capture frame rate is capped at 30fps, this score
207 // cannot get any better than (lower) 33.33 ms. 207 // cannot get any better than (lower) 33.33 ms.
208 // TODO(ericrk): Remove the "Capture" result once we are confident that
209 // "CaptureSucceeded" is giving the coverage we want. crbug.com/489817
208 EXPECT_TRUE(PrintResults(analyzer.get(), 210 EXPECT_TRUE(PrintResults(analyzer.get(),
209 test_name, 211 test_name,
210 "Capture", 212 "Capture",
211 "ms")); 213 "ms"));
214
215 // Also track the CaptureSucceeded event. Capture only indicates that a
216 // capture was requested, but this capture may later be aborted without
217 // running. CaptureSucceeded tracks successful frame captures.
218 EXPECT_TRUE(
219 PrintResults(analyzer.get(), test_name, "CaptureSucceeded", "ms"));
212 } 220 }
213 }; 221 };
214 222
215 } // namespace 223 } // namespace
216 224
217 IN_PROC_BROWSER_TEST_P(TabCapturePerformanceTest, Performance) { 225 IN_PROC_BROWSER_TEST_P(TabCapturePerformanceTest, Performance) {
218 RunTest("TabCapturePerformance"); 226 RunTest("TabCapturePerformance");
219 } 227 }
220 228
221 // Note: First argument is optional and intentionally left blank. 229 // Note: First argument is optional and intentionally left blank.
(...skipping 25 matching lines...) Expand all
247 TabCapturePerformanceTest, 255 TabCapturePerformanceTest,
248 testing::Values( 256 testing::Values(
249 kScalingTestBase | kScaleQualityFast, 257 kScalingTestBase | kScaleQualityFast,
250 kScalingTestBase | kScaleQualityGood, 258 kScalingTestBase | kScaleQualityGood,
251 kScalingTestBase | kScaleQualityBest, 259 kScalingTestBase | kScaleQualityBest,
252 kScalingTestBase | kScaleQualityFast | kSmallWindow, 260 kScalingTestBase | kScaleQualityFast | kSmallWindow,
253 kScalingTestBase | kScaleQualityGood | kSmallWindow, 261 kScalingTestBase | kScaleQualityGood | kSmallWindow,
254 kScalingTestBase | kScaleQualityBest | kSmallWindow)); 262 kScalingTestBase | kScaleQualityBest | kSmallWindow));
255 263
256 #endif // USE_AURA 264 #endif // USE_AURA
OLDNEW
« no previous file with comments | « no previous file | content/browser/media/capture/content_video_capture_device_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698