Firefox OS/Performance/Graphics/FPSMeasure

From MozillaWiki
Jump to: navigation, 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


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.


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.