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

Issue 949613002: [Android] Add animation frame time histogram class. (Closed)

Created:
5 years, 10 months ago by Kibeom Kim (inactive)
Modified:
5 years, 9 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, danduong
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android] Add animation frame time histogram UMA facility. We didn't have any metric for measuring Android UI animation jankiness before, and recently it came to our attention that animations are very janky on some low-end devices. It will be useful to know how the animations are doing on various user devices. This class can be used to record animation frame times histogram, for example: AnimationFrameTimeHistogram histogram = new AnimationFrameTimeHistogram(HISTOGRAM_NAME); histogram.startRecording(); // An animation to measure histogram.endRecording(); or animator.addListener(AnimationFrameTimeHistogram.getAnimatorRecorder( HISTOGRAM_NAME); To my knowledge, the closest thing we have is measuring each task runtime using TaskStopwatch class, but that doesn't suit for us since Android animation frame tasks are managed by Android, and even if we can use, it will require a JNI call for each frame. BUG=461066 Committed: https://crrev.com/30c682a7b93f8cac1c99c1c61316f7539de86c85 Cr-Commit-Position: refs/heads/master@{#318533}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 7

Patch Set 8 : Cache listener, off-load some initializing from startRecording to constructor #

Total comments: 2

Patch Set 9 : more detailed description in histograms.xml, a minor code style change. #

Total comments: 6

Patch Set 10 : remove unnecessary final. #

Patch Set 11 : Use TimeAnimator instead of Choreographer #

Total comments: 4

Patch Set 12 : ns -> ms renaming, excluded AppMenu #

Unified diffs Side-by-side diffs Delta from patch set Stats (+208 lines, -0 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
A base/android/animation_frame_time_histogram.h View 1 chunk +18 lines, -0 lines 0 comments Download
A base/android/animation_frame_time_histogram.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +36 lines, -0 lines 0 comments Download
M base/android/base_jni_registrar.cc View 2 chunks +3 lines, -0 lines 0 comments Download
A base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java View 1 2 3 4 5 6 7 8 9 10 1 chunk +145 lines, -0 lines 0 comments Download
M base/base.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (5 generated)
Kibeom Kim (inactive)
5 years, 10 months ago (2015-02-21 06:19:48 UTC) #2
aurimas (slooooooooow)
https://codereview.chromium.org/949613002/diff/110001/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java File chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java (right): https://codereview.chromium.org/949613002/diff/110001/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java#newcode343 chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java:343: new AnimationFrameTimeHistogram("WrenchMenu.OpeningAnimationFrameTimes"); Android strongly suggests against new object creation ...
5 years, 10 months ago (2015-02-23 18:03:59 UTC) #3
David Trainor- moved to gerrit
lgtm with nits: - Re: Aurimas' suggestion: Can we cache the listener? - Maybe use ...
5 years, 10 months ago (2015-02-23 18:20:35 UTC) #4
Kibeom Kim (inactive)
https://codereview.chromium.org/949613002/diff/110001/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java File chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java (right): https://codereview.chromium.org/949613002/diff/110001/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java#newcode347 chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java:347: mAnimationFrameTimeHistogram.startRecording(); On 2015/02/23 18:03:59, aurimas wrote: > How cheap ...
5 years, 10 months ago (2015-02-23 18:27:24 UTC) #5
aurimas (slooooooooow)
On 2015/02/23 at 18:27:24, kkimlabs wrote: > https://codereview.chromium.org/949613002/diff/110001/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java > File chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java (right): > > https://codereview.chromium.org/949613002/diff/110001/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java#newcode347 ...
5 years, 10 months ago (2015-02-23 18:59:38 UTC) #6
Kibeom Kim (inactive)
On 2015/02/23 18:59:38, aurimas wrote: > On 2015/02/23 at 18:27:24, kkimlabs wrote: > > > ...
5 years, 10 months ago (2015-02-23 19:05:01 UTC) #7
David Trainor- moved to gerrit
On 2015/02/23 19:05:01, Kibeom Kim wrote: > On 2015/02/23 18:59:38, aurimas wrote: > > On ...
5 years, 10 months ago (2015-02-23 19:10:58 UTC) #8
aurimas (slooooooooow)
On 2015/02/23 at 19:10:58, dtrainor wrote: > On 2015/02/23 19:05:01, Kibeom Kim wrote: > > ...
5 years, 10 months ago (2015-02-23 19:12:21 UTC) #9
Kibeom Kim (inactive)
ptal. https://codereview.chromium.org/949613002/diff/110001/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java File chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java (right): https://codereview.chromium.org/949613002/diff/110001/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java#newcode341 chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java:341: animation.addListener(new AnimatorListener() { On 2015/02/23 18:20:35, David Trainor ...
5 years, 10 months ago (2015-02-23 22:17:29 UTC) #10
Kibeom Kim (inactive)
+OWNERS ptal nyquist: base/android/animation_frame_time_histogram.cc base/android/animation_frame_time_histogram.h base/android/base_jni_registrar.cc base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java danakj: base/BUILD.gn base/base.gyp base/base.gypi base/time/time.h base/time/time_unittest.cc isherman: tools/metrics/histograms/histograms.xml
5 years, 10 months ago (2015-02-23 23:40:51 UTC) #12
Ilya Sherman
https://codereview.chromium.org/949613002/diff/130001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/949613002/diff/130001/tools/metrics/histograms/histograms.xml#newcode43460 tools/metrics/histograms/histograms.xml:43460: + <summary>Frame times of Android wrench menu opening animation.</summary> ...
5 years, 10 months ago (2015-02-24 05:28:51 UTC) #13
Kibeom Kim (inactive)
https://codereview.chromium.org/949613002/diff/130001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/949613002/diff/130001/tools/metrics/histograms/histograms.xml#newcode43460 tools/metrics/histograms/histograms.xml:43460: + <summary>Frame times of Android wrench menu opening animation.</summary> ...
5 years, 10 months ago (2015-02-24 18:25:54 UTC) #14
Ilya Sherman
LGTM, thanks.
5 years, 10 months ago (2015-02-24 18:53:11 UTC) #15
nyquist
https://codereview.chromium.org/949613002/diff/150001/base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java File base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java (right): https://codereview.chromium.org/949613002/diff/150001/base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java#newcode48 base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java:48: mAnimationFrameTimeHistogram.endRecording(); If this gets called often, would that skew ...
5 years, 10 months ago (2015-02-24 23:26:56 UTC) #16
Kibeom Kim (inactive)
https://codereview.chromium.org/949613002/diff/150001/base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java File base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java (right): https://codereview.chromium.org/949613002/diff/150001/base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java#newcode48 base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java:48: mAnimationFrameTimeHistogram.endRecording(); On 2015/02/24 23:26:56, nyquist wrote: > If this ...
5 years, 10 months ago (2015-02-25 00:17:47 UTC) #17
Kibeom Kim (inactive)
nyquist@ : ptal, changed to TimeAnimator. It's also API 16 but we decided that it's ...
5 years, 10 months ago (2015-02-25 19:17:09 UTC) #18
Kibeom Kim (inactive)
On 2015/02/25 19:17:09, Kibeom Kim wrote: > nyquist@ : ptal, changed to TimeAnimator. It's also ...
5 years, 10 months ago (2015-02-25 19:25:20 UTC) #19
nyquist
The CL description is incredibly short. Care to expand a bit? Maybe answer questions in ...
5 years, 10 months ago (2015-02-27 04:02:19 UTC) #20
Kibeom Kim (inactive)
ptal danakj@ or thakis@ (trivial file adding changes): base/BUILD.gn base/base.gyp base/base.gypi Excluded AppMenu.java usage from ...
5 years, 9 months ago (2015-02-27 19:56:40 UTC) #22
nyquist
lgtm
5 years, 9 months ago (2015-02-27 21:20:28 UTC) #23
Nico
lgtm
5 years, 9 months ago (2015-02-27 21:21:47 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/949613002/210001
5 years, 9 months ago (2015-02-27 21:27:17 UTC) #27
commit-bot: I haz the power
Committed patchset #12 (id:210001)
5 years, 9 months ago (2015-02-27 22:37:16 UTC) #28
commit-bot: I haz the power
5 years, 9 months ago (2015-02-27 22:37:51 UTC) #29
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/30c682a7b93f8cac1c99c1c61316f7539de86c85
Cr-Commit-Position: refs/heads/master@{#318533}

Powered by Google App Engine
This is Rietveld 408576698