Performance Monitor in Oracle Commerce (ATG)
Hi All,
Performance is considered to be the most important factor in the success of the developmental projects. In my earlier posts, I have shared my thoughts to do efficient development. If you are seeing this posts for the first I am going to share what are the steps to be followed for identifying how our code performs in the environment.
Oracle web commerce as a matured enterprise applications gives you away, you can use and find it if you are not using it there are also different tools available you can use and identify it. I am going to concentrate more into the Oracle Web Commerce Tools that is Performance Monitor.
I recommend the following steps below.
1. Find the performace of your service using the chrome developer tools,Soap UI,jprofiler and many tools avalaible in the market.
2. Identify the services that takes more time to respond.
3.start putting the Performance Monitor to the places which you suspect causing the more loopings or time consuming if you know it by guess. or else put in these places.Usually start of the method and handlers,droplets etc.
Here's how you can put it . This is the starting of the Performance Monitor .
if (PerformanceMonitor.isEnabled()) {
PerformanceMonitor.startOperation(String pOpName, String pParameter);
}
The End of the Performance Monitor should be the same as like passing the start parameter.
if (PerformanceMonitor.isEnabled()) {
PerformanceMonitor.endOperation(String pOpName, String pParameter);
}
If you want to cancel the Operation then you can do by.
if (PerformanceMonitor.isEnabled()) {
PerformanceMonitor.cancelOperation(String pOpName, String pParameter);
}
Here pOpName is the operation with this name get listed down in the console, will see the viewing in the end part. I recomment to use the class name by the follwing way . So it will be easily identifiable.
this.getClass().getName()
Where the parameter is the any name you pass should be descriptive and menaningful.
When you are starting the operation, it shoule be ended otherwise it will not be causing any significance in adding it . Also, you can start the operation with the multiple operations with the same arguments, you should pass unique for avoidng the collision between the operations.
After adding this promote the code to any environements and do the following .
1. enable the performance monitor
Navigate to the folowing component .
http://hostname:port/dyn/admin/atg/dynamo/admin/en/performance-monitor-config.jhtml
Here you can set the modes .
There are different modes avaliable .
1.NORMAL - track the stack of operations each thread is currently executing
2.TIME - keep statistics for how much time each operation takes
3.MEMORY - keep statistics for how much time and memory each operation takes
4.DISABLED
It will be disable by defult enable it by selecting any of the modes . Based on the type of performace you want to measure.
after enabling it to execute or invoke your service again .
Then Navigate to the dashboard or the console for the results .
You can view the results at . http://hostname:port/dyn/admin/atg/dynamo/admin/en/performance-monitor.jhtml
Here you can see with the operations name, when you click more you will get the indivituval parameters level results towards the following parameters .
Operation||Number of Executions || Average Execution Time (msec)|| Minimum Execution Time (msec) || Maximum Execution Time (msec) || Total Execution Time (msec)
With this, you can analyse which part you have to concentrate and simplify the logic and remove the lopping etc.
Happy Learning . I will try to cover the indivutuval modes in detail in the upcoming posts .
x