How to show fps on the web client?

In vtk.js you have that example.