Packagemx.messaging.messages
Classpublic class MessagePerformanceUtils
InheritanceMessagePerformanceUtils Inheritance Object

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

The MessagePerformanceUtils utility class is used to retrieve various metrics about the sizing and timing of a message sent from a client to the server and its response message, as well as pushed messages from the server to the client. Metrics are gathered when corresponding properties on the channel used are enabled: <record-message-times> denotes capturing of timing information, <record-message-sizes> denotes capturing of sizing information.

You can then use methods of this utility class to retrieve various performance information about the message that you have just received.

When these metrics are enabled an instance of this class should be created from a response, acknowledgement, or message handler using code such as below:

          var mpiutil:MessagePerformanceUtils = new MessagePerformanceUtils(event.message);
     



Public Properties
 PropertyDefined By
  clientReceiveTime : Number
[read-only] Timestamp in milliseconds since epoch of when the client received response message from the server.
MessagePerformanceUtils
  messageSize : int
[read-only] The size of the original client message as measured during deserialization by the server endpoint.
MessagePerformanceUtils
  networkRTT : Number
[read-only] The network round trip time for a client message and the server response to it, calculated by the difference between total time and server processing time.
MessagePerformanceUtils
  originatingMessageSentTime : Number
[read-only] Only populated in the case of a pushed message, timestamp in milliseconds since epoch of when the client that caused a push message sent its message.
MessagePerformanceUtils
  originatingMessageSize : Number
[read-only] Only populated in the case of a pushed message, size in Bytes of the message that originally caused this pushed message.
MessagePerformanceUtils
  pushedMessageFlag : Boolean
[read-only] Returns true if message was pushed to the client and is not a response to a message that originated on the client.
MessagePerformanceUtils
  pushOneWayTime : Number
[read-only] Only populated in the case of a pushed message, this is the network time between the server pushing the message and the client receiving it.
MessagePerformanceUtils
  responseMessageSize : int
[read-only] The size of the response message sent to the client by the server as measured during serialization at the server endpoint.
MessagePerformanceUtils
  serverAdapterExternalTime : Number
[read-only] Time spent in a module invoked from the adapter associated with the destination for this message but external to it, before either the response to the message was ready or the message had been prepared to be pushed to the receiving client.
MessagePerformanceUtils
  serverAdapterTime : Number
[read-only] Time spent in the adapter associated with the destination for this message before either the response to the message was ready or the message had been prepared to be pushed to the receiving client.
MessagePerformanceUtils
  serverNonAdapterTime : Number
[read-only] Server processing time spent outside of the adapter associated with the destination of this message.
MessagePerformanceUtils
  serverPollDelay : Number
[read-only] Time that the message waited on the server after it was ready to be pushed to the client but had not yet been polled for.
MessagePerformanceUtils
  serverPrePushTime : Number
[read-only] Time between server receiving the client message and the server beginning to push messages out to other clients as a result of the original message.
MessagePerformanceUtils
  serverProcessingTime : Number
[read-only] Time between server receiving the client message and either the time the server responded to the received message or had the pushed message ready to be sent to the receiving client.
MessagePerformanceUtils
  serverSendTime : Number
[read-only] Timestamp in milliseconds since epoch of when the server sent a response message back to the client.
MessagePerformanceUtils
  totalPushTime : Number
[read-only] Only populated in the case of a pushed message, this is the time between the push causing client sending its message and the push receving client receiving it.
MessagePerformanceUtils
  totalTime : Number
[read-only] Time between this client sending a message and receiving a response for it from the server
MessagePerformanceUtils
Public Methods
 MethodDefined By
  
MessagePerformanceUtils(message:Object)
Constructor Creates an MPUtils instance with information from the MPI headers of the passed in message
MessagePerformanceUtils
  
prettyPrint():String
Returns a summary of all information available in MPI.
MessagePerformanceUtils
Property Detail
clientReceiveTimeproperty
clientReceiveTime:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Timestamp in milliseconds since epoch of when the client received response message from the server.


Implementation
    public function get clientReceiveTime():Number
messageSizeproperty 
messageSize:int  [read-only]

The size of the original client message as measured during deserialization by the server endpoint.


Implementation
    public function get messageSize():int
networkRTTproperty 
networkRTT:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

The network round trip time for a client message and the server response to it, calculated by the difference between total time and server processing time.


Implementation
    public function get networkRTT():Number
originatingMessageSentTimeproperty 
originatingMessageSentTime:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Only populated in the case of a pushed message, timestamp in milliseconds since epoch of when the client that caused a push message sent its message.


Implementation
    public function get originatingMessageSentTime():Number
originatingMessageSizeproperty 
originatingMessageSize:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Only populated in the case of a pushed message, size in Bytes of the message that originally caused this pushed message.


Implementation
    public function get originatingMessageSize():Number
pushedMessageFlagproperty 
pushedMessageFlag:Boolean  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Returns true if message was pushed to the client and is not a response to a message that originated on the client.


Implementation
    public function get pushedMessageFlag():Boolean
pushOneWayTimeproperty 
pushOneWayTime:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Only populated in the case of a pushed message, this is the network time between the server pushing the message and the client receiving it. Note that the server and client clocks must be in sync for this to be meaningful.


Implementation
    public function get pushOneWayTime():Number
responseMessageSizeproperty 
responseMessageSize:int  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

The size of the response message sent to the client by the server as measured during serialization at the server endpoint.


Implementation
    public function get responseMessageSize():int
serverAdapterExternalTimeproperty 
serverAdapterExternalTime:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Time spent in a module invoked from the adapter associated with the destination for this message but external to it, before either the response to the message was ready or the message had been prepared to be pushed to the receiving client.


Implementation
    public function get serverAdapterExternalTime():Number
serverAdapterTimeproperty 
serverAdapterTime:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Time spent in the adapter associated with the destination for this message before either the response to the message was ready or the message had been prepared to be pushed to the receiving client.


Implementation
    public function get serverAdapterTime():Number
serverNonAdapterTimeproperty 
serverNonAdapterTime:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Server processing time spent outside of the adapter associated with the destination of this message.


Implementation
    public function get serverNonAdapterTime():Number
serverPollDelayproperty 
serverPollDelay:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Time that the message waited on the server after it was ready to be pushed to the client but had not yet been polled for.


Implementation
    public function get serverPollDelay():Number
serverPrePushTimeproperty 
serverPrePushTime:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Time between server receiving the client message and the server beginning to push messages out to other clients as a result of the original message.


Implementation
    public function get serverPrePushTime():Number
serverProcessingTimeproperty 
serverProcessingTime:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Time between server receiving the client message and either the time the server responded to the received message or had the pushed message ready to be sent to the receiving client.


Implementation
    public function get serverProcessingTime():Number
serverSendTimeproperty 
serverSendTime:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Timestamp in milliseconds since epoch of when the server sent a response message back to the client.


Implementation
    public function get serverSendTime():Number
totalPushTimeproperty 
totalPushTime:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Only populated in the case of a pushed message, this is the time between the push causing client sending its message and the push receving client receiving it. Note that the two clients' clocks must be in sync for this to be meaningful.


Implementation
    public function get totalPushTime():Number
totalTimeproperty 
totalTime:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Time between this client sending a message and receiving a response for it from the server


Implementation
    public function get totalTime():Number
Constructor Detail
MessagePerformanceUtils()Constructor
public function MessagePerformanceUtils(message:Object)

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Constructor Creates an MPUtils instance with information from the MPI headers of the passed in message

Parameters
message:Object — The message whose MPI headers will be used in retrieving MPI information
Method Detail
prettyPrint()method
public function prettyPrint():String

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Returns a summary of all information available in MPI. For example:

              var mpiutil:MessagePerformanceUtils = new MessagePerformanceUtils(message);                     
              Alert.show(mpiutil.prettyPrint(), "MPI Output", Alert.NONMODAL);
         

Returns
String — String containing a summary of all information available in MPI