Firefox OS/Performance/Graphics/FPSMeasure

From MozillaWiki
< Firefox OS‎ | Performance‎ | Graphics
Revision as of 13:59, 1 February 2015 by Lakrits (talk | contribs) (Lakrits moved page FirefoxOS/Performance/Graphics/FPSMeasure to Firefox OS/Performance/Graphics/FPSMeasure: The official spelling of "Firefox OS" leaves a space between the two parts of the name. It's easier to find a page if the spelling of it...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

How to measure FPS

We currently measure how often we composite and how often we have layer transactions. Enabling the FPS counter shows, from the current time, how many frames we have composites in the last second. We do this by using a rotating buffer of composite timestamps. If you need something more regular, you can enable these two preferences:

layers.acceleration.draw-fps.print-histogram layers.acceleration.draw-fps.write-to-file

layers.acceleration.draw-fps.print-histogram

This preference creates a rotating window of the past 10 seconds of composites. It is currently hard coded to be 10 seconds. You can test scrolling FPS by scrolling continuously for 10 seconds, at which point a histogram, including the mean, median, and standard deviation of composite times will be printed to logcat.

layers.acceleration.draw-fps.write-to-file

This preference will write the time between composites to a file. The file will be in the TEMP directory of the current platform. Two files will be written, fps.txt and txn.txt. FPS.txt shows the time between composites. txn.txt shows the time between layer transactions.