New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 758439 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug

Blocking:
issue 754471



Sign in to add a comment

Implement UMA metric to estimate frame rate of declarative animations

Project Member Reported by chrishtr@chromium.org, Aug 24 2017

Issue description

Currently, we have metrics to estimate draw interval speed (impl-thread frame rate),
and some approximations of main-thread frame rate, but we don't have focused
versions of them that are only recorded when animations are active.

Experiments such as issue 754471 would greatly benefit from a frame rate metric for
animations.

Proposed implementation:

Track on cc::AnimationHost three conditions: (a) whether there is at least one
composited animation happening. (b) whether there is at least one main-thread animation
happening. (c) whether there is at least one main-thread animation happening which
might be composited. Normally (c) would never happen, except in situations like issue
754471.

Record new UMAs for draw time and time between layer tree activations for each of the
above conditions. This means 6 new UMAs.

Implementation would use DocumentAnimations::NeedsAnimationTimingUpdate() as a proxy
for condition (b). cc::AnimationHost can compute condition (a) by looking over all known
animations and seeing if they are active. (c) can be computed by looping over all main-thread
animations and checking whether the element had animation promotion triggers absent any
experiment.
 
Cc: rbyers@chromium.org
Note: discussed the above with flackr at length today: thanks for all the insights
about how to achieve this.
Another note on implementation: Blink can communicate the main-thread state about
running animations to cc::AnimationHost by way of a method on blink::CompositedAnimationHost, which is owned by the root LocalFrameView.

Comment 4 by flackr@chromium.org, Aug 24 2017

I think ideally we would have a count of the number of main thread and composited animations so that we might better gauge the impact of this change. I.e. there are some sites which currently have a main thread background color animation but smooth transform animations which may look worse when those transforms are moved to main as well. This is of course very hard to judge since any particular animation could be more visually jarring than another.

The activation timing should be recorded at draw time as well; in CompositorTimingHistory::DidDraw we know if we used a new active tree. This indicates that main thread animations would have updated and we'll be comparing the same times (when the compositor finished the frame) rather than comparing different events.

Comment 5 by rbyers@chromium.org, Aug 24 2017

Cc: tdres...@chromium.org

Comment 6 by rbyers@chromium.org, Aug 24 2017

This related to (perhaps a more detailed subset) of tdresser's effort to define a high-level frame throughput metric -  issue 625700 .

Comment 7 by rbyers@chromium.org, Aug 24 2017

Cc: ajuma@chromium.org sunn...@chromium.org
Cc: briander...@chromium.org vmi...@chromium.org
Had a meeting with brianderson@ and vmiura@, it appears that there are some overlap between this and the work in GPU team that tries to measure frame throughput.

Currently I have a WIP CL for this bug, does it make sense to put the CL on hold until we have a final plan for how to measure the frame throughput?
Project Member

Comment 10 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a

commit d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a
Author: Xida Chen <xidachen@chromium.org>
Date: Thu Oct 26 17:14:52 2017

Implement animation targeted UMA

This CL adds 3 animation specific UMAs. We first check the following 3
conditions:
1. Whether there is at least one composited animation.
2. Whether there is at least one main-thread animation.
3. Whether there is at least one main-thread animation, that it could
   be composited, but not due to running experiment(s).

For each of the above conditions, record the draw time.

The UMAs are designed for this experiment: crbug.com/754471, which is
to turn off compositing 2D transform & opacity animations, and we'd like
to have meaningful UMAs to measure the impact of the experiment.

The CL also added unit tests to make sure that:
1. We are getting the correct count for each of the above three
   conditions.
2. We are getting the correct UMA reporting.
3. In CompositorAnimationsTest.cpp, we added test case to make sure that
   the transform animation is composited with the
   "TurnOff2DAndOpacityCompositorAnimations" disabled, and not
   composited when the flag is enabled.

TBR=haraken@chromium.org

Bug:  758439 ,  761968 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie6eb207df86cb47b3670472d256f7a63bbe39914
Reviewed-on: https://chromium-review.googlesource.com/636305
Commit-Queue: Xida Chen <xidachen@chromium.org>
Reviewed-by: Ian Vollick <vollick@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511859}
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/animation/animation_host.cc
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/animation/animation_host.h
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/animation/animation_player.cc
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/animation/animation_player.h
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/animation/animation_ticker.cc
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/animation/animation_ticker.h
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/animation/element_animations_unittest.cc
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/scheduler/compositor_timing_history.cc
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/scheduler/compositor_timing_history.h
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/scheduler/compositor_timing_history_unittest.cc
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/scheduler/scheduler.cc
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/scheduler/scheduler.h
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/scheduler/scheduler_unittest.cc
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/trees/mutator_host.h
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/trees/proxy_impl.cc
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/trees/proxy_impl.h
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/trees/single_thread_proxy.cc
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/cc/trees/single_thread_proxy.h
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/controller/BUILD.gn
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/core/animation/Animation.cpp
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/core/animation/Animation.h
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/core/animation/CompositorAnimations.h
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/core/animation/DocumentAnimations.cpp
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/core/animation/DocumentTimeline.cpp
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/core/animation/DocumentTimeline.h
[add] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/core/animation/test_data/transform-animation.html
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/platform/animation/CompositorAnimationHost.cpp
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/platform/animation/CompositorAnimationHost.h
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/platform/testing/RuntimeEnabledFeaturesTestHelpers.h
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/platform/testing/URLTestHelpers.cpp
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/third_party/WebKit/Source/platform/testing/URLTestHelpers.h
[modify] https://crrev.com/d8bb3b2e9c6fb3b28cd4be68b1c5fbece8d4900a/tools/metrics/histograms/histograms.xml

Status: Fixed (was: Assigned)

Sign in to add a comment