*
The moose likes Performance and the fly likes How to use Jamon properly for measuring perofrmance of a JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "How to use Jamon properly for measuring perofrmance of a JSP " Watch "How to use Jamon properly for measuring perofrmance of a JSP " New topic
Author

How to use Jamon properly for measuring perofrmance of a JSP

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,


Please tell me how to use Jamon API for meausing performance .
I have a jsp page as shown above with start and stop methods of Jamon API .

WIth the report shown , i didn't fing any usefulness of Jamon CUrrently , please tell me how to use it properly , or make any chnages to current JSP so that it could be more meaningful

Right now i am seeing that , only the number of Hits are useful Hits=2.0

please guide me .

Thanks





Evaluating date now
Report isJAMon Label=myFirstMonitor, Units=ms.: (LastValue=0.0, Hits=2.0, Avg=0.
0, Total=0.0, Min=0.0, Max=0.0, Active=1.0, Avg Active=2.0, Max Active=2.0, Firs
t Access=Sat Dec 04 18:59:36 GMT+05:30 2010, Last Access=Sat Dec 04 19:01:18 GMT
+05:30 2010)


http://www.ssouza.com/JAMon/JAMonAdmin.jsp , this url is also not working .


Save India From Corruption - Anna Hazare.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
What were you expecting to see?

Doing System.out.println and creating a Date object is not likely to take enough time to show up reliably in Milliseconds.

Bill
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
You'll need to access the Jamon web app on your local machine - that's where you'll find the performance data.
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Doing System.out.println and creating a Date object is not likely to take enough time to show up reliably in Milliseconds.


Here i am calling a servlet , which sleeps for 1000 Ms , but i still couldn't find it useful

please guide me , because the same i will be implementing when my Jsp page calls EJB Layer for data insertion .





please advice .
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Read the Jamon user guide, and then follow the advice I gave earlier.
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

You'll need to access the Jamon web app on your local machine - that's where you'll find the performance data.


i have done this thing earlier , which gave me this below error , and there is no help for this .




so i was bothered with the start and stop methods of the API currently , the reason being asked for help.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Well, the data is collected and displayed in the jamon web app, so you need to get that up and running.

You haven't altered the jamonapi.jsp page, have you? Where do you have the jamon jar file?
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

You haven't altered the jamonapi.jsp page, have you? Where do you have the jamon jar file?


Thanks for the response , i haven't altered any jsp page inside the jamon war file , and i have the jar file set up in the class path through IDE .

Do you have any idea as where and what to make chnages inside the jsp file
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

May be web application would be too complex for me for initial understanding . so i tried a small java standalone with start and stop



but still its the same , any help
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
IDEs are for development; whatever you do inside of them is irrelevant for deployment. You need to deploy Jamon in your servlet container like its user guide describes.
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 861
You are making it more complicated than it is. You don't need to change any jsp files, and you don't need to change your code to monitor. Here is a link that explains the process. There are only a few simple steps. The only problem I have ever seen is that people put the jamon jar file in their own application instead of the server level. The symptom for this is that you have no data in the jamonadmin.jsp file.

http://jamonapi.sourceforge.net/http_monitoring.html


http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

You don't need to change any jsp files, and you don't need to change your code to monitor.


Thank you steve for the link . it realy looks simple with this .

but again i got confused seeing this thread .

http://www.coderanch.com/t/202734/Performance/java/JaMon-helpful-web-application

please guide .
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 861
As I said if you follow the steps it should work. That poster had put the jamon jar in the wrong location. Have you tried following the steps?
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thanks Steve , with your help i could able to successfully start with Jamon ApI

I deployed a small JSP page which will just give Date onto Expression .

When i used JAmon for this , it gave me wrong information as such Number of Hits is 19 , where i accessed this page not more than 5 times , and i could see all this information such as response time is also not so useful , which can easily given by HTTP Basic Tool .

So how could i find JAMON useful ?? please guide me .

please see the screen shot attached of my application the page is index.jsp .


[Thumbnail for Post.jpeg]

steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 861
What exactly are you trying to do? What are you trying to track? If jamon says 19 hits have occurred then I suspect 19 hits have occurred. The only way that I can see that you would have done 5 page requests and 19 showed up is if you also put a jamon monitor in your jsp.
steve souza
Ranch Hand

Joined: Jun 26, 2002
Posts: 861
i could see all this information such as response time is also not so useful , which can easily given by HTTP Basic Tool

You should read the jamon web site as it talks about all this and more. It doesn't sound like you have read it at all. Even in your report jamon is tracking more than response time. It tracks bytes sent, http status codes, and whether a page is currently executing. It also tracks similar stats for SQL invocations, and EJB code without you changing your code. In addition you can add monitors to your own code and do custom monitoring. There are other features that allow you to keep the most recent page invocations in a buffer as well as their time and status code. Also it can track the slowest pages in say the past 24 hours, week etc. All these principals apply to any monitor you might create. All this and more is mentioned in the documenation. Having said all that if that isn't enough by all means use any tool you want.
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

If jamon says 19 hits have occurred then I suspect 19 hits have occurred.


Thanks Steve for the responses .


As a newbie to Jamon , please suggest me as how do i learn Jamon ?? any simple example which may seem that jaom is useful .

and also clarify me if Jamon is a Monitoring tool or also can be seen as a Profiler ??


Please suggest .



Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
You really don't want to read the documentation, do you?
 
wood burning stoves
 
subject: How to use Jamon properly for measuring perofrmance of a JSP