Accurately display the FPS of your application

I understand that, by default, Corona applications are locked at a frame rate of 30 FPS.

Though that’s more of an upperbound, meaning it can’t go above that number.

So how do I display the REAL fps my application is running at?

[lua]

display.fps

[/lua]

does not display what I am looking for, if i make things in my application too hectic I can bring it down to around 5-10 FPS, however that API call always displays a 30

basically, 

[lua]

local myText = display.newText(display.fps, display.contentWidth - 30, display.contentHeight - 30, native.systemFont, 16)

local function updateText()

    myText.txt = display.fps

end

Runtime:addEventListener(“enterFrame”, updateText)

[/lua]

is not doing it for me 

what you are querying is the fps that the game is set to , not what is actually occurring.

this can be overridden in your config.lua :

[lua]

application = {

    content = {

        width = 704,

        height = 1024, 

        scale = “letterBox”,

        fps = 60,

[/lua]

there’s example code here to show actual frame rate and memory

http://developer.coronalabs.com/code/output-fps-and-texture-memory-usage-your-app

Display.fps will give you target value set in config.lua. you must count real fps on your own. Eg. on enter frame increment some counter by 1. Set up some infinitive Timer.performWithDelay() to evaluate fps based on frames count and time between timer calls.

Wasn’t looking for a way to change how the upper bound of the FPS, was just looking for a way to show what the realtime fps of my app was, which your link help me do that, thank you. 

what you are querying is the fps that the game is set to , not what is actually occurring.

this can be overridden in your config.lua :

[lua]

application = {

    content = {

        width = 704,

        height = 1024, 

        scale = “letterBox”,

        fps = 60,

[/lua]

there’s example code here to show actual frame rate and memory

http://developer.coronalabs.com/code/output-fps-and-texture-memory-usage-your-app

Display.fps will give you target value set in config.lua. you must count real fps on your own. Eg. on enter frame increment some counter by 1. Set up some infinitive Timer.performWithDelay() to evaluate fps based on frames count and time between timer calls.

Wasn’t looking for a way to change how the upper bound of the FPS, was just looking for a way to show what the realtime fps of my app was, which your link help me do that, thank you.