|
Written by Jay Taoko
|
|
Wednesday, 25 March 2009 00:00 |
|
There are many statistics you want to get from your programs. If you are doing 3D graphics you certainly want to know the frame rate of your program or how many polygons are on rendered on screen at one particular moment. To get your numbers out, you can always print them on screen but you might cover IT almost completely if you have a lot of stats to render.
DevTool has some features to let you send your stats over the network interface to DevTool's client interface. Let's say you have some frame rate data you want to display on the client interface. All you have to do is create a Stat object and write your data to it periodically. The client interface renders your stats inside the appropriate user interface element.
The frame rate of the program is displayed in DevTool's client interface.
The time graph pictured above refreshes itself every seconds. If it does not receive new stats in time, the curve representing the stat will slowly fall to 0. However you can always configure the graph refresh period to match to the period at which you provide statistics data.
Sending your numbers over the network is a good thing as the simple fact of displaying data on-screen constantly eat up part of your CPU and GPU time during every frame. The time graph feature present in DevTool's client interface save you the code you need in your programs to manage and display your stats.
 |