Method Summary
|
addMonitoredProperty
(
|
This methods adds a property to be monitored to an existing profiling session. This can be done before the session is started TeiProfilerService#startProfiling or to an ongoing session. |
|
createProfilingSession
(
|
This method is used to create a profiling session. One profiling session can be used to monitor different properties but only the same property once. An application can create a profiling session to monitor itself or another application. |
|
getSample
(
|
This method is used to get a sample of the current value of the property. The measurement will be of type TeiProfilerService.MEASUREMENT_TYPE_SAMPLE. |
|
getSupportedProperties
(
|
This method returns a sequence of the properties the application supports. |
|
releaseProfilingSession
(
|
This method is used to release a profiling session. All ongoing profiling associated with this session will be stopped. All ongoing profiling sessions will be released upon application termination. |
|
removeMonitoredProperty
(
|
This method removes a property from a profiling session. |
|
startProfiling
(
|
This methods is used to start a profiling session. Applicable variable properties for this session will be reset to zero at the start of the session, see definition for each property above. |
Inherited Methods
|
addEventListener
(
|
This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners. |
|
removeEventListener
(
|
This method removes an event listener for a specific event. |
Type Definitions
|
The measurement type is used to distinguish between sampling of a property or an average calculation. |
|
|
The session identifier type. |
|
|
|
|
|
The threshold type specifies the subscription behaviour of the monitored property TeiProfilerService#subscribe. |
|
Events
Constants
- CONST_PROPERTY_ECMASCRIPT_HEAP
- CONST_PROPERTY_GRAPHICS_MEMORY
- CONST_PROPERTY_SYSTEM_MEMORY
- VAR_PROPERTY_ECMASCRIPT_GC_RECLAIMED
- VAR_PROPERTY_ECMASCRIPT_GC_TIME
- VAR_PROPERTY_ECMASCRIPT_HEAP
- VAR_PROPERTY_ECMASCRIPT_HEAP_PEAK
- VAR_PROPERTY_FRAME_TIME
- VAR_PROPERTY_FRAMES_DISPLAYED
- VAR_PROPERTY_GRAPHICS_MEMORY
- VAR_PROPERTY_GRAPHICS_MEMORY_PEAK
- VAR_PROPERTY_GRAPHICS_OPERATIONS
- VAR_PROPERTY_GRAPHICS_SURFACES
- VAR_PROPERTY_GRAPHICS_SURFACES_PEAK
- VAR_PROPERTY_SYSTEM_MEMORY
- VAR_PROPERTY_SYSTEM_MEMORY_PEAK
Methods
This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.
Inherited From:
Parameters:
-
Name Type Description typenumber The event type of the event to subscribe to.
listenerToiEventListener The JavaScript function that will receive events.
Throws:
-
ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the application calls addEventListener with the same combination of type and listener twice.
This methods adds a property to be monitored to an existing profiling session. This can be done before the session is started TeiProfilerService#startProfiling or to an ongoing session.
Parameters:
-
Name Type Description profilingIdTeiProfilerService.TeiProfilingId The identifier of the profiling session.
propertystring The property.
timeSpannumber The profiling window in seconds used to calculate the average value. If timeSpan is non-zero, TeiProfilerService#getAverage will return the average value per second. The maximum timespan is 60 seconds. If timeSpan is zero TeiProfilerService#getSample will return the current value of the property.
Throws:
-
ToiOperationNotSupportedException Raised if monitoring of the property is not supported. Raised if monitoring of the property with the given timeSpan is not supported.
ToiInvalidArgumentException Raised if the profilingId or property is invalid.
This method is used to create a profiling session. One profiling session can be used to monitor different properties but only the same property once. An application can create a profiling session to monitor itself or another application.
Parameters:
-
Name Type Description monitoredNamestring The name of the application to be monitored.
Throws:
-
ToiOperationNotSupportedException Raised if the monitored application does not support the monitored functionality.
ToiInvalidArgumentException Raised if either the applicationId or the monitored application name is invalid.
Returns:
-
Type: TeiProfilerService.TeiProfilingId
The identifier of the profiling session.
This method is used to get a sample of the current value of the property. The measurement will be of type TeiProfilerService.MEASUREMENT_TYPE_SAMPLE.
Parameters:
-
Name Type Description profilingIdTeiProfilerService.TeiProfilingId The identifier of the profiling session.
propertystring The property being profiled.
Throws:
-
ToiInvalidArgumentException Raised if the profilingId is invalid.
ToiInvalidPreconditionException Raised if profiling for this session has not been started or the property is not monitored, or the property is not configured to be monitored with valid timeSpan TeiProfilerService#addMonitoredProperty.
Returns:
-
Type: TeiProfilerService.TeiMeasurement
The measurement.
This method returns a sequence of the properties the application supports.
Parameters:
-
Name Type Description applicationNamestring The name of the application to be monitored.
Throws:
-
ToiInvalidArgumentException Raised if the monitored application name is invalid.
Returns:
-
Type: Array.<string>
A sequence of the properties the application supports.
This method is used to release a profiling session. All ongoing profiling associated with this session will be stopped. All ongoing profiling sessions will be released upon application termination.
Parameters:
-
Name Type Description profilingIdTeiProfilerService.TeiProfilingId The identifier of the profiling session.
Throws:
-
ToiInvalidArgumentException Raised if the profilingId is invalid or already has been released.
ToiInvalidPreconditionException Raised if more than 32 sessions are created.
This method removes an event listener for a specific event.
Inherited From:
Parameters:
-
Name Type Description typenumber The event type of the event to remove the listener from.
listenerToiEventListener The JavaScript function that was previously added as an event listener.
Throws:
-
ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the listener has not previously been added.
This method removes a property from a profiling session.
Parameters:
-
Name Type Description profilingIdTeiProfilerService.TeiProfilingId The identifier of the profiling session.
propertystring The property.
Throws:
-
ToiInvalidArgumentException Raised if the profilingId or property is invalid.
This methods is used to start a profiling session. Applicable variable properties for this session will be reset to zero at the start of the session, see definition for each property above.
Parameters:
-
Name Type Description profilingIdTeiProfilerService.TeiProfilingId The identifier of the profiling session.
Throws:
-
ToiInvalidArgumentException Raised if the profilingId is invalid.
ToiInvalidPreconditionException Raised if the profiling session has already been started.
Members
This is an Event identifier for TeiProfilerThresholdReachedEvent.
This method is called when the threshold is reached for an application property.
The measurement is the average value for a property.
The measurement is a sample of a property.
The number of bytes reclaimed by the EcmaScript engine on the latest garbage collection. TeiProfilerService#getAverage returns the average number of bytes reclaimed per garbage collection, taking only in consideration cases where the number bytes is >= 1.
The time in milliseconds spent by the EcmaScript engine on the latest garbage collection. TeiProfilerService#getAverage returns the average time per garbage collection, taking only into consideration cases where time is >= 1 ms.
The peak on the amount of heap memory in bytes in use by the EcmaScript engine. Reset to zero at start of a profiling session TeiProfilerService#startProfiling.
The number of frames displayed. Reset to zero at start of a profiling session TeiProfilerService#startProfiling. TeiProfilerService#getAverage returns the average number of frames displayed per second.
The peak on the amount of graphics memory in use for all applications. Reset to zero at start of a profiling session TeiProfilerService#startProfiling.
The number of hardware graphics operations performed by the application. Reset to zero at start of a profiling session TeiProfilerService#startProfiling. TeiProfilerService#getAverage returns the average number of graphics operations per second.
The peak of the number of graphics surfaces allocated. Reset to zero at start of a profiling session TeiProfilerService#startProfiling.
The peak on the amount of system memory (RAM) used by the application in bytes. Reset to zero at start of a profiling session TeiProfilerService#startProfiling.
The measurement.
Struct fields
| Name | Description |
|---|---|
| property | The property. Type: string |
| specifier | The specification of the threshold. Type: TeiProfilerService.TeiThresholdSpecifier |
| threshold | The threshold, TeiProfilerService#subscribe. Type: double |
| timeStamp | The timestamp at which the measurement was done in seconds. The timestamp is reset to zero at the start of the profiling session TeiProfilerService#startProfiling. Type: double |
| type | The type of the measurement. Type: TeiProfilerService.TeiMeasurementType |
| value | The value. Type: double |