Class Index | File Index

Classes


Namespace R.debug.Metrics

A static class to be used to measure metrics of engine and game performance. A visual profiler is provided which graphs runtime values of the engine, such as load and visible objects. Additionally a metrics window is provided to show sampled metric data from parts of the engine, as well as user-defined metrics.
Defined in: debug.metrics.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
R.debug.Metrics.add(metricName, value, smoothing, fmt)
Add a metric to the game engine that can be displayed while it is running.
<static>  
R.debug.Metrics.hideMetrics()
Hide the metrics window
<static>  
R.debug.Metrics.remove(metricName)
Remove a metric from the display
<static>  
R.debug.Metrics.setSampleRate(sampleRate)
Set the interval at which metrics are sampled by the system.
<static>  
R.debug.Metrics.showMetrics()
Show the metrics window
<static>  
R.debug.Metrics.showProfile()
Show a graph of the engine profile
<static>  
R.debug.Metrics.toggleMetrics()
Toggle the display of the metrics window.
Namespace Detail
R.debug.Metrics
Method Detail
<static> R.debug.Metrics.add(metricName, value, smoothing, fmt)
Add a metric to the game engine that can be displayed while it is running. If smoothing is selected, a 3 point running average will be used to smooth out jitters in the value that is shown. For the fmt argument, you can provide a string which contains the pound sign "#" that will be used to determine where the calculated value will occur in the formatted string.
Parameters:
metricName
{String} The name of the metric to track
value
{String/Number} The value of the metric.
smoothing
{Boolean} true to use 3 point average smoothing
fmt
{String} The way the value should be formatted in the display (e.g. "#ms")

<static> R.debug.Metrics.hideMetrics()
Hide the metrics window

<static> R.debug.Metrics.remove(metricName)
Remove a metric from the display
Parameters:
metricName
{String} The name of the metric to remove

<static> R.debug.Metrics.setSampleRate(sampleRate)
Set the interval at which metrics are sampled by the system. The default is for metrics to be calculated every 10 engine frames.
Parameters:
sampleRate
{Number} The number of ticks between samples

<static> R.debug.Metrics.showMetrics()
Show the metrics window

<static> R.debug.Metrics.showProfile()
Show a graph of the engine profile

<static> R.debug.Metrics.toggleMetrics()
Toggle the display of the metrics window. Any metrics that are being tracked will be reported in this window.

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Mar 18 2013 16:09:18 GMT-0400 (EDT)