• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jsp response time

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I am interested in measuring the response time for a jsp i.e; the time between the instant the request is received by the JSP, to the instant the result in html in produced(on server side). Note that this does not include the network transmission time.
I tried using simple system.currenttimemillis() at the start and end of the jsp; but this does not given me the right values.
Any help in this in highly appreciated.
Thanks
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats the only call to get system time. Why do you think it is not working?
Bill
 
tony al
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am actually interested in finding the variation in the jsp response time as the load on the jsp increases. But, I am not noticing any difference in jsp response time with increase in load, using my current method. I think this is because I am not taking into account the wait time between when the http request was recevied to when the actual processing of the jsp began. I do notice that the jsp output is much slower with increase in load, but the response time using my current method remains the same.
So if there was a way to find the time when the actual HTTP request was received, rather than just when the jsp processing started(as done by using the system.currenttimeinmillis at the beginning of the jsp), I think I would find a solution to this.
Thanks for your help
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which JSP container are you using? If you have the source code you could probably put time logging in the network protocol handling code.
In practice, though, the obvious way is to use one of the many tools which measure remotely and include the network latency in the total. That's what matters to users, after all.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Sir,
Take this
u place this at the start of ur jsp page
<%
long stime = System.currentTimeMillis();
%>
//statement or data..any thing...

last
<%
long etime = System.currentTimeMillis();
double elapsed = (etime - stime)/1000.0;
%>
try it out...
byeeeee
 
Why am I so drawn to cherry pie? I can't seem to stop. Save me tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic