perl CGI (3)
Visual Basic (1)
Measure how long it takes to generate a web page with perl
This article has not been rated yet. After reading, feel free to leave comments and rate it.
Question:I'm in the process of optimizing my web site's backend (database) and want to display how long it actually takes to generate each page. All pages are generated with perl.
Answer:Use the Benchmark module as shown in the example. If you view a page and hit reload a few times, you'll find that the measured time will vary quite a bit but it will give you a rough estimate if adding that new index made any difference or not.
Obviously the network transfer time doesn't get added to the measured time which is exactly the way you need it.