I want to measure the FPS of my Android Augmented Reality app. I am trying to follow the documentation for using dumpsys framestats.
This is my procedure:
- connect device (Galaxy Tab S5e) via USB to computer (MacBook Pro)
- Launch application
- Open terminal and enter
adb shell dumpsys gfxinfo <PACKAGE_NAME> framestats
I get results. The documentation says that I should get some CSV data (which I do). Here it is:
Flags,IntendedVsync,Vsync,OldestInputEvent,NewestInputEvent,HandleInputStart,AnimationStart,PerformTraversalsStart,DrawStart,SyncQueued,SyncStart,IssueDrawCommandsStart,SwapBuffers,FrameCompleted,DequeueBufferDuration,QueueBufferDuration,
1,270900288236110,270901404902732,9223372036854775807,0,270901406732543,270901407052751,270901407062751,270901480932022,270901488003689,270901488511137,270901489180876,270901502575459,270901504554157,1520000,1026000,
1,270901416955482,270901500288812,9223372036854775807,0,270901507061241,270901507131709,270901507732074,270901524054574,270901524125251,270901524430720,270901524804834,270901531068480,270901534144522,3249000,1831000,
Firstly, why is there only two rows, if:
"Each line of this output represents a frame produced by the app"
If I wait and then rerun the command, I again only get 2 rows. Sometimes the values have updated, but other times they have not...
The documentation says that I can calculate frame time with:
(FRAME_COMPLETED - INTENDED_VSYNC)
So, I thought I could run the ADB command after say, 1 minute, get out a load of frame times and then graph it, but if I only get out 2 frames at a time... and if rerunning the ADB command does not update the data... how can I measure Frametimes? What am I missing here?