PHP
  Home arrow PHP arrow Benchmarking Applications with PHP
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM Developerworks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Benchmarking Applications with PHP
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2008-04-23

    Table of Contents:
  • Benchmarking Applications with PHP
  • Using the microtime() built-in PHP function
  • Simplifying the use of the microtime() function
  • Using an object-oriented approach for benchmarking scripts
  • Defining a wrapper method for the PHP 5 microtime() function

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    TestComplete™ automates software testing for a fraction of what the big guys charge. Easy functional and load testing for all Windows, .NET, Java and Web apps. Download a free trial now.

    Benchmarking Applications with PHP
    (Page 1 of 5 )

    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.

    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


       · One exciting thing that you want to do with PHP, is benchmarking a particular...
       · The technique described (using microtime()) has limitations in that you must add the...
       · Thank you for commenting on my PHP article and for mentioning the xdebug extension....
     

       

    PHP ARTICLES

    - Comparing Files and Databases with PHP Bench...
    - Setting Up a Web-Based Image Gallery
    - Using Timers to Benchmark PHP Applications
    - Benchmarking Applications with PHP
    - Setting Up a Web-Based File Manager: PHPfile...
    - Developing a Modular Class For a PHP File Up...
    - Setting Up a Web-Based File Manager: bfExplo...
    - Defining a Custom Function for File Uploader...
    - Parsing Child Nodes with the DOM XML extensi...
    - Creating an Error Handling Module for a PHP ...
    - Accessing Attributes and Cloning Nodes with ...
    - Retrieving Information on Selected Files wit...
    - Handling HTML Strings and Files with the DOM...
    - Building File Uploaders with PHP 5
    - Working with Multiple Document Nodes with th...

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway