Packagecom.gskinner.performance
Classpublic class RenderTest
InheritanceRenderTest Inheritance AbstractTest Inheritance flash.events.EventDispatcher

Represents a render test, which times how long it takes to draw a specified DisplayObject to a BitmapData instance. This provides a reasonable idea of the rendering and compositing time required to draw the DisplayObject to screen. Note that this test will only utilize a single processor core to perform the draw, whereas multiple cores may be utilized to draw it to the screen.



Public Properties
 PropertyDefined by
  bounds : Rectangle
The area of the display object to draw.
RenderTest
 Inheriteddescription : String
Optional description for this test.
AbstractTest
 Inheriteddeviation : Number = 0
Provides a rough indication of how much the results of different iterations varied from the norm as a fraction of the average time.
AbstractTest
  displayObject : DisplayObject
The DisplayObject to draw.
RenderTest
 Inheritederror : Error
If an error occurs in any iteration of the test, the error property will contain the resulting Error object.
AbstractTest
 Inheritediterations : uint
The number of iterations to run with this test.
AbstractTest
 Inheritedloops : uint
Specifies how many times to repeat the test within a single iteration.
AbstractTest
 Inheritedmax : int = -1
The highest time for all iterations, or -1 if the test has not yet run successfully.
AbstractTest
 Inheritedmin : int = -1
The lowest time for all iterations, or -1 if the test has not yet run successfully.
AbstractTest
 Inheritedname : String
Optional name for this test.
AbstractTest
 Inheritedtime : Number = -1
The average time for all iterations, or -1 if the test has not yet run successfully.
AbstractTest
 InheritedtimeLog : Array
An array of int values indicating the times for each iteration that was run.
AbstractTest
Public Methods
 MethodDefined by
  
RenderTest(displayObject:DisplayObject, bounds:Rectangle = null, name:String = null, iterations:uint = 0, loops:uint = 1, description:String = null)
Creates a new instance of RenderTest.
RenderTest
 Inherited
complete():void
PerformanceTest calls complete() when all of the iterations of the test have been run.
AbstractTest
  
run():int
PerformanceTest calls run() on tests to run and time them.
RenderTest
 Inherited
toString():String
Returns a string representation of this Test.
AbstractTest
 Inherited
toXML():XML
Returns XML containing all of the information about this test.
AbstractTest
Events
 EventSummaryDefined by
 Inherited Dispatched when the test completes.AbstractTest
Property detail
boundsproperty
public var bounds:Rectangle

The area of the display object to draw. If null then displayObject.getBounds() will be used.

displayObjectproperty 
public var displayObject:DisplayObject

The DisplayObject to draw.

Constructor detail
RenderTest()constructor
public function RenderTest(displayObject:DisplayObject, bounds:Rectangle = null, name:String = null, iterations:uint = 0, loops:uint = 1, description:String = null)

Creates a new instance of RenderTest. See properties for parameter information.

Parameters
displayObject:DisplayObject
 
bounds:Rectangle (default = null)
 
name:String (default = null)
 
iterations:uint (default = 0)
 
loops:uint (default = 1)
 
description:String (default = null)
Method detail
run()method
public override function run():int

PerformanceTest calls run() on tests to run and time them. The run() method returns the time for that iteration, or -1 if an error occurred. You would not generally call the run() method directly.

Returns
int