# How to get fps value

**URL:** https://forum.babylonjs.com/t/how-to-get-fps-value/35146
**Category:** Questions
**Created:** [October 26, 2022, 2:50pm UTC](https://forum.babylonjs.com/t/how-to-get-fps-value/35146 "2022-10-26T14:50:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Johny\_Mickey](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johny_mickey/32/24948_2.png) [@Johny\_Mickey](https://forum.babylonjs.com/u/Johny_Mickey)
#### Post date: [October 26, 2022, 2:50pm UTC](https://forum.babylonjs.com/t/how-to-get-fps-value/35146/1 "2022-10-26T14:50:15Z")

</div>

Hello there, how to get a variable with the current number of frames per second (fps)? What is the most efficient way? I need it mainly to evaluate, recognize the situation when the fps drops so much that the game is unplayable.

---

<div class="post-metadata">

### Author: ![link2twenty](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/link2twenty/32/19199_2.png) [@link2twenty](https://forum.babylonjs.com/u/link2twenty)
#### Post date: [October 26, 2022, 2:57pm UTC](https://forum.babylonjs.com/t/how-to-get-fps-value/35146/2 "2022-10-26T14:57:14Z")

</div>

You can get the fps by running `engine.getFps()`. I would recommend running this in your `engine.runRenderLoop` function and updating a HTML element you put over the top of everything.

---

<div class="post-metadata">

### Author: ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)
#### Post date: [October 26, 2022, 3:58pm UTC](https://forum.babylonjs.com/t/how-to-get-fps-value/35146/3 "2022-10-26T15:58:52Z")

</div>

In addition to `engine.getFps()`.  
The simplest way to know FPS is just to open the Inspector

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/0/5/0572e255ae91174128996c1b8490228e017a5430.png)

Also, below is the button which is called “Open Realtime Perf Viewer” - a fantastic visual performance debugging tool which can help you easily identify performance issues and hiccups in your scene. More info here - [The Performance Profiler | Babylon.js Documentation](https://doc.babylonjs.com/toolsAndResources/inspector/performanceProfiler)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/f/5/f5c2d3c49593642338ae2f56904d1d779868d2cd.png)

And, finally, one may use some simple bookmarklet as here - [Babylon.js Playground](https://playground.babylonjs.com/#RB5ZS4)
