org.zkoss.zk.ui.util
Interface PerformanceMeter


public interface PerformanceMeter

A listener to measure the performance of certain activities.

Note: ZK doesn't fork another low-priority thread to call the methods defined in this listener. It is the implementation's job to minimize the overhead when calculating the performance data.

Since:
3.0.0
Author:
tomyeh

Method Summary
 void requestCompleteAtClient(java.lang.String requestId, Execution exec, long time)
          Called to notify when the client has completed the processing of the response.
 void requestCompleteAtServer(java.lang.String requestId, Execution exec, long time)
          Called to notify when the server has completed the processing of the request.
 void requestStartAtClient(java.lang.String requestId, Execution exec, long time)
          Called to notify when the client starts to send the request to server.
 void requestStartAtServer(java.lang.String requestId, Execution exec, long time)
          Called to notify when the server receives the request.
 

Method Detail

requestStartAtClient

void requestStartAtClient(java.lang.String requestId,
                          Execution exec,
                          long time)
Called to notify when the client starts to send the request to server.

Parameters:
requestId - a system-wide unique ID to identify a request.
exec - the execution. You can retrieve the desktop, session and user's info from it. But, don't access the component in this method since it is not safe (exec is not activated).
time - the time representing the number of milliseconds between midnight January 1, 1970 (UTC) to when the client starts the request. It is client's time, not server's.

requestCompleteAtClient

void requestCompleteAtClient(java.lang.String requestId,
                             Execution exec,
                             long time)
Called to notify when the client has completed the processing of the response.

Note: the invocation of this method doesn't take place immediately. Rather it is piggyback when the client is sending another request. It also means that this method might not be called for each request (due to no further request).

Parameters:
requestId - a system-wide unique ID to identify a request.
exec - the execution. You can retrieve the desktop, session and user's info from it. But, don't access the component in this method since it is not safe (exec is not activated).
time - the time representing the number of milliseconds between midnight January 1, 1970 (UTC) to when the client has completed the process. It is client's time, not server's.

requestStartAtServer

void requestStartAtServer(java.lang.String requestId,
                          Execution exec,
                          long time)
Called to notify when the server receives the request.

Parameters:
requestId - a system-wide unique ID to identify a request. It is the same request ID as requestStartAtClient(java.lang.String, org.zkoss.zk.ui.Execution, long).
exec - the execution. You can retrieve the desktop, session and user's info from it. But, don't access the component in this method since it is not safe (exec is not activated).
time - the time representing the number of milliseconds between midnight January 1, 1970 (UTC) to when the server receives the request. It is server's time.

requestCompleteAtServer

void requestCompleteAtServer(java.lang.String requestId,
                             Execution exec,
                             long time)
Called to notify when the server has completed the processing of the request.

Parameters:
requestId - a system-wide unique ID to identify a request.
exec - the execution. You can retrieve the desktop, session and user's info from it. But, don't access the component in this method since it is not safe (exec is not activated).
time - the time representing the number of milliseconds between midnight January 1, 1970 (UTC) to when the server has completed the process. It is server's time.


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.