Commit 5a1526c3 authored by ericrk's avatar ericrk Committed by Commit bot

Update TabCapturePerformanceTest to more accurately time captures.

Currently TabCapturePerformanceTest records the time between "Capture"
events to determine the rate of capture. These events are issued whenever
a capture is requested, even if it is later aborted, and doesn't represent
the actual capture framerate. This CL adds an event on capture
success which will provide a more accurate idea of capture framerate.

BUG=489796

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

Cr-Commit-Position: refs/heads/master@{#330785}
parent ada65a7b
......@@ -205,10 +205,18 @@ class TabCapturePerformanceTest
// This prints out the average time between capture events.
// As the capture frame rate is capped at 30fps, this score
// cannot get any better than (lower) 33.33 ms.
// TODO(ericrk): Remove the "Capture" result once we are confident that
// "CaptureSucceeded" is giving the coverage we want. crbug.com/489817
EXPECT_TRUE(PrintResults(analyzer.get(),
test_name,
"Capture",
"ms"));
// Also track the CaptureSucceeded event. Capture only indicates that a
// capture was requested, but this capture may later be aborted without
// running. CaptureSucceeded tracks successful frame captures.
EXPECT_TRUE(
PrintResults(analyzer.get(), test_name, "CaptureSucceeded", "ms"));
}
};
......
......@@ -182,6 +182,9 @@ void ThreadSafeCaptureOracle::DidCaptureFrame(
if (success) {
if (oracle_.CompleteCapture(frame_number, &timestamp)) {
TRACE_EVENT_INSTANT0("gpu.capture", "CaptureSucceeded",
TRACE_EVENT_SCOPE_THREAD);
frame->metadata()->SetDouble(media::VideoFrameMetadata::FRAME_RATE,
params_.requested_format.frame_rate);
frame->metadata()->SetTimeTicks(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment