-
kkimlabs authored
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 Review URL: https://codereview.chromium.org/949613002 Cr-Commit-Position: refs/heads/master@{#318533}
30c682a7