Home arrow PHP arrow Benchmarking Applications with PHP

Benchmarking Applications with PHP

Benchmarking a particular application across its different development cycles is one of the most exciting things for a PHP developer. If you’re anything like me, you have had your head spinning with questions, such as… is the performance of my last project good enough? How long does it take to fetch a particular data set from my database? Do I have to implement a caching system? As you can see, these and other dilemmas (add your own to the list) sometimes make peace of mind a nearly impossible goal.

TABLE OF CONTENTS:
  1. Benchmarking Applications with PHP
  2. Using the microtime() built-in PHP function
  3. Simplifying the use of the microtime() function
  4. Using an object-oriented approach for benchmarking scripts
  5. Defining a wrapper method for the PHP 5 microtime() function
By: Alejandro Gervasio
Rating: starstarstarstarstar / 4
April 23, 2008

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

While these problems may eventually affect your mental health, the truth is that they can easily be solved by coding a few simple scripts, or by defining some straightforward functions in PHP to benchmark particular blocks of code, or even an entire application.

Naturally, when it comes to benchmarking the performance of diverse applications, the first method that comes to my mind is the implementation of the popular “microtime()” built-in PHP function. This has become one of the most popular methods for measuring the time consumed by PHP (and other third-party software packages) when performing specific tasks.

Of course, this handy function is used mostly in conjunction with others that are aimed at developing fairly accurate benchmarking applications. You’ve probably utilized it hundreds of times during the development of different web projects. Nevertheless, benchmarking PHP programs is a huge topic that can’t be covered in just a few articles. At least in this new series, I’m going to introduce some basic methods to make the whole process as painless as possible.

By the end of this series, you should be equipped with a decent background on how to benchmark applications with PHP, which is something that can be really useful if you’re careful about developing high-performance programs.

Having outlined the subject of this series, let’s introduce ourselves to the exciting world of benchmarking with PHP. Let’s get going!



 
 
>>> 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: