When a user says that “the system is slow” we would like to know: Is the system actually running slow or is it a matter of perception?
Is the chronometer distorted or does the system, in fact, prevent the user from working in a normal way?
Nothing beats numbers when we’re in search of conclusions about the system’s true behavior. Something that proves quite useful in revealing the response time of web applications is to enable what is known as “time taken.” It’s used not only for performance tests but also, and mainly, for systems in production.
Basically, we indicate what it is that we want to be recorded on the access_log. What is usually recorded here is the moment at which a resource was accessed. We have the option to request that the information of the “user-agent” be saved (to know from what browser, or even from what device, the access occurred), in addition to the size of the resource sent, the http response code (200 indicating OK, 4XX indicating error on the client side, 5XX indicating error on the server side, and 3XX indicating, in general, a redirection), as well as the time elapsed from the receipt of the request to the return of a response.
This is something quite simple to configure. For example, in Tomcat, we must modify the “server.xml” by including, in the end, the following information:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i" %D" />
The part where we indicate what should be saved is the one defined in “pattern.” To know the meaning of each parameter, there is a reference here, but, in advance, you should know that the %D (or %T) is what we have to add for the response time, or time taken, to be saved.
After we have an access log with all this information, we can use one of the many tools available for viewing. There are two alternatives to mention, one is commercial (Apache Log Viewer) and the other is open source (AccessLog Viewer by Abstracta).
If we get these accurate measures of each request, we can be sure about the time taken by the server. If those values differ greatly from the user perception, we still need to avoid possible subjectivities in the response times reported by users, so, we can do that by measuring the time taken in the browser (with tools like Fiddler or PageSpeed) and comparing results.
Recommended for You
How to Optimize E-commerce Website Performance for Black Friday
How to Execute Performance Tests with Fewer Problems
Sofia Palamarchuk
Related Posts
Quality Sense Podcast: Anand Bagmar – What You Should Know About Visual Testing
In this Quality Sense episode, host, Federico Toledo interviews Anand Bagmar, a professional from India with over 20 years of experience in the software industry. Today, he’s a Quality Evangelist and Solution Architect at Applitools. In this episode, the two uncover the basics of visual…
Hosted by Abstracta, WOPR29 is just around the corner
How was WOPR29’s theme chosen and why is it being hosted by Abstracta in Uruguay? Find out in this article, featuring Paul Holland, Andy Hohenner, Eric Proegler, and Federico Toledo. Many articles are coming up in this new saga called “Performance Testing In-Depth”, with interviews…
[…] Is the System Actually Running Slow? […]