|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zkdemo.test.PerformanceMeter
public class PerformanceMeter
A simple performance meter.
| Constructor Summary | |
|---|---|
PerformanceMeter()
|
|
| 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 |
requestReceiveAtClient(java.lang.String requestId,
Execution exec,
long time)
Called to notify when the client has received the response (but not processed yet). |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PerformanceMeter()
| Method Detail |
|---|
public void requestStartAtClient(java.lang.String requestId,
Execution exec,
long time)
PerformanceMeter
requestStartAtClient in interface PerformanceMeterrequestId - a desktop-wide unique ID to identify a request.
Note: it is not the same as ExecutionCtrl.getRequestId()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.
public void requestReceiveAtClient(java.lang.String requestId,
Execution exec,
long time)
PerformanceMeterNote: 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).
Note to version prior to 3.0.8:
This method is introduced since 3.0.8.
Prior to 3.0.8, PerformanceMeter.requestCompleteAtClient(java.lang.String, org.zkoss.zk.ui.Execution, long) is actually
the time when the client recieved the response rather than
when the response has been processed.
requestReceiveAtClient in interface PerformanceMeterrequestId - a desktop-wide unique ID to identify a request.
If PerformanceMeter.requestStartAtClient(java.lang.String, org.zkoss.zk.ui.Execution, long) was called, it is the same as
the request ID that was passed to PerformanceMeter.requestStartAtClient(java.lang.String, org.zkoss.zk.ui.Execution, long),
If not called, it is the desktop's ID.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.
public void requestCompleteAtClient(java.lang.String requestId,
Execution exec,
long time)
PerformanceMeterNote: 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).
requestCompleteAtClient in interface PerformanceMeterrequestId - a desktop-wide unique ID to identify a request.
If PerformanceMeter.requestStartAtClient(java.lang.String, org.zkoss.zk.ui.Execution, long) was called, it is the same as
the request ID that was passed to PerformanceMeter.requestStartAtClient(java.lang.String, org.zkoss.zk.ui.Execution, long),
If not called, it is the desktop's ID.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.
public void requestStartAtServer(java.lang.String requestId,
Execution exec,
long time)
PerformanceMeter
requestStartAtServer in interface PerformanceMeterrequestId - a desktop-wide unique ID to identify a request.
If PerformanceMeter.requestStartAtClient(java.lang.String, org.zkoss.zk.ui.Execution, long) was called, it is the same as
the request ID that was passed to PerformanceMeter.requestStartAtClient(java.lang.String, org.zkoss.zk.ui.Execution, long),
If not called, it is the desktop's ID.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.
public void requestCompleteAtServer(java.lang.String requestId,
Execution exec,
long time)
PerformanceMeter
requestCompleteAtServer in interface PerformanceMeterrequestId - a desktop-wide unique ID to identify a request.
If PerformanceMeter.requestStartAtClient(java.lang.String, org.zkoss.zk.ui.Execution, long) was called, it is the same as
the request ID that was passed to PerformanceMeter.requestStartAtClient(java.lang.String, org.zkoss.zk.ui.Execution, long),
If not called, it is the desktop's ID.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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||