The frames/second counter

The frames/second and seconds/frame indicators on dynagraph's window are intended as a crude means for performance measurement of the graphics rendering hardware and software. The displayed numbers are meaningful mostly in the auto-rotate mode, that is, when the Spin button is activated. The main loop during the auto-rotate looks like this:

     loop:
         rotate graph
         get current time
         draw
         get current time
         compute and print elapsed time
	 sleep
     endloop

The display shows the elapsed time as seconds/frame or its reciprocal as frames/second.

It is important to note that the elapsed time does not include the time needed for the "rotate graph" segment of the loop (see the pseudo-code above) nor the time spent in "sleep" segment. Therefore both frames/second or second/frames are misnomers. Seconds/frame, for instance, indicates the time needed to draw the scene, but does not include the time needed to compute and update the rotation/orientation prior to drawing it. The latter is often the dominant part of the time spent in the loop. The "sleep" segment pads the loop to limit the number of cycles to no more than 25 per second. The latter is controlled by the underlying XForms library.

The displayed timing is intended to be used as a measure of the raw speed of the graphics rendering engine. For instance, if your speed reading is 200 frames/second, it does not mean that you are actually watching a movie at 200 frames/second. It means that it takes 1/200 seconds to draw the graph. The loop itself is called at most 25 times per second. You can expect to get much faster drawing speed readings if your hardware/software combination supports 3D hardware rendering.

Back to table of contents