Performance Monitoring"

From Documentation
 
(16 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
To improve the performance of an Ajax application, it is better to monitor the performance for identifying the bottleneck. Depending on the information you'd like to know, there are a few approaches.
 
To improve the performance of an Ajax application, it is better to monitor the performance for identifying the bottleneck. Depending on the information you'd like to know, there are a few approaches.
  
* <javadoc type="interface">org.zkoss.zk.ui.util.PerformanceMeter</javadoc>: Monitoring the performance from network speed, server-processing time and the client-rendering time.
+
* <javadoc type="interface">org.zkoss.zk.ui.util.PerformanceMeter</javadoc>: Monitoring the performance from the network speed, server-processing time and the client-rendering time.
 
* <javadoc type="interface">org.zkoss.zk.ui.util.EventInterceptor</javadoc>: Monitoring the performance of each event listener.
 
* <javadoc type="interface">org.zkoss.zk.ui.util.EventInterceptor</javadoc>: Monitoring the performance of each event listener.
* There are a lot of performance monitor tools, such as [https://visualvm.dev.java.net/ VisualVM] and [http://www.ej-technologies.com/products/jprofiler/overview.html JProfiler]. They could provide more insightful view of your application.
+
* <javadoc type="interface">org.zkoss.zk.ui.util.Monitor</javadoc>: Monitoring the number of desktops, sessions and other system load.
 +
* There are a lot of performance monitor tools, such as [https://visualvm.github.io/ VisualVM] and [http://www.ej-technologies.com/products/jprofiler/overview.html JProfiler]. They can provide more insightful view of your application.
  
=Performance Meter=
+
{{ZKDevelopersReferenceHeadingToc}}
<javadoc type="interface">org.zkoss.zk.ui.util.PerformanceMeter</javadoc> is a collection of callbacks that the implementation could know when a request is sent, arrives and is processed.
 
 
 
[[Image:performancemeter.png]]
 
 
 
As show above, T1-T5 identifies the following callbacks.
 
* T1: <javadoc type="interface" method="requestStartAtClient (java.lang.String, org.zkoss.zk.ui.Execution, long)">org.zkoss.zk.ui.util.PerformanceMeter</javadoc>
 
* T2: <javadoc type="interface" method="requestStartAtServer(java.lang.String, org.zkoss.zk.ui.Execution, long)">org.zkoss.zk.ui.util.PerformanceMeter</javadoc>
 
* T3: <javadoc type="interface" method="requestCompleteAtServer(java.lang.String, org.zkoss.zk.ui.Execution, long)">org.zkoss.zk.ui.util.PerformanceMeter</javadoc>
 
* T4: <javadoc type="interface" method="requestReceiveAtClient(java.lang.String, org.zkoss.zk.ui.Execution, long)">org.zkoss.zk.ui.util.PerformanceMeter</javadoc>
 
* T5: <javadoc type="interface" method="requestCompleteAtClient(java.lang.String, org.zkoss.zk.ui.Execution, long)">org.zkoss.zk.ui.util.PerformanceMeter</javadoc>
 
 
 
Thus,
 
 
 
* Server Execution Time: T3 - T2
 
* Client Execution Time: T5 - T4
 
* Network Latency Time: (T4 - T3) + (T2 - T1)
 
 
 
Notice that, when we make a connection to load a page for the first time, only Server Execution Time is available. T4 and T5 will be saved on the client side, and sent back along with the next request.
 
 
 
=Event Interceptor=
 
 
 
=Further Reading=
 
  
 
For sample implementations, you might take a look at the following articles:
 
For sample implementations, you might take a look at the following articles:
Line 38: Line 17:
 
* [[Small Talks/2010/January/A ZK Performance Monitor|A ZK Performance Monitor]]
 
* [[Small Talks/2010/January/A ZK Performance Monitor|A ZK Performance Monitor]]
 
* [[Small Talks/2010/April/Real-time Performance Monitoring of Ajax Event Handlers|Real-time Performance Monitoring of Ajax Event Handlers]]
 
* [[Small Talks/2010/April/Real-time Performance Monitoring of Ajax Event Handlers|Real-time Performance Monitoring of Ajax Event Handlers]]
 
=Version History=
 
{{LastUpdated}}
 
{| border='1px' | width="100%"
 
! Version !! Date !! Content
 
|-
 
| &nbsp;
 
| &nbsp;
 
| &nbsp;
 
|}
 
  
 
{{ZKDevelopersReferencePageFooter}}
 
{{ZKDevelopersReferencePageFooter}}

Latest revision as of 07:08, 11 November 2020


Performance Monitoring



To improve the performance of an Ajax application, it is better to monitor the performance for identifying the bottleneck. Depending on the information you'd like to know, there are a few approaches.

  • PerformanceMeter: Monitoring the performance from the network speed, server-processing time and the client-rendering time.
  • EventInterceptor: Monitoring the performance of each event listener.
  • Monitor: Monitoring the number of desktops, sessions and other system load.
  • There are a lot of performance monitor tools, such as VisualVM and JProfiler. They can provide more insightful view of your application.



For sample implementations, you might take a look at the following articles:



Last Update : 2020/11/11

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.