Firefox OS/Performance/Graphics/FPSMeasure: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
m (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...)
 
(No difference)

Latest revision as of 13:59, 1 February 2015

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.