Home arrow PHP arrow Using Timers to Benchmark PHP Applications

Using Timers to Benchmark PHP Applications

If you’ve been using PHP for a while, then it’s possible that you want to learn how to create benchmarking scripts. If this is true, then this series of tutorials will be pretty helpful. Welcome to the second article of the series “Benchmarking applications with PHP.” Composed of three parts, this series walks you through the development of several approaches aimed at benchmarking specific blocks of code and even entire PHP applications.

TABLE OF CONTENTS:
  1. Using Timers to Benchmark PHP Applications
  2. Defining a few working classes
  3. Displaying database rows without using HTTP compression
  4. Displaying database records using HTTP compression
By: Alejandro Gervasio
Rating: starstarstarstarstar / 4
April 30, 2008

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

As you’ll surely recall from the last tutorial, I discussed distinct approaches for benchmarking concrete portions of code and even complete programs. These methods, which were originally created either as procedural solutions or object-based techniques, used the “microtime()” PHP built-in function to create simple timing functions along with a pair of useful timer classes.

Even though all the methods that I mentioned before are really simple to understand and follow rather basic logic, they’re also useful for creating more sophisticated timing solutions that eventually might fit the requirements of high-performance applications. I’m only going to provide you with some handy pointers on developing these kinds of timing mechanisms; what you do with them is obviously up to you.

Well, having refreshed the topics discussed in the first tutorial of the series, it’s time to go over the subject of this one. This way you will know what to expect from it before you start reading.

Since you already know how to create timer functions and classes, in this tutorial, I’ll create some concrete examples that show where these timing mechanisms can be applied in order to evaluate the performance of certain PHP applications.

Are you ready to learn more about how to benchmark applications with PHP? Let’s get started!



 
 
>>> More PHP Articles          >>> More By Alejandro Gervasio
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: