News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Benchmarking with the Xdebug Extension
March 09, 2009 @ 15:11:17

DevShed has posted their next-to-last article in their look at using XDebug in your applications - part six, a look at doing some benchmarking with functions the extension provides.

You'll be pleased to hear that the Xdebug extension comes equipped with additional functions that allow us to perform other debugging tasks, such as benchmarking PHP applications and checking in what order certain functions were called by the PHP engine. Therefore, in this sixth chapter of the series I'll be discussing in depth how to take advantage of the benchmarking abilities offered by the Xdebug library, which rely heavily on its "xdebug_time_index()" function.

Their benchamrking example uses the xdebug_time_index function to compare the start and end times of a script. Dropping it into a method in a class makes it even easier - they call the getTime method in their Timer class to grab the latest value.

0 comments voice your opinion now!
benchmark xdebug extension tutorial timer start end


Matt Curry's Blog:
Check Out These Upgrades I Made To The CakePHP DebugKit
January 30, 2009 @ 10:21:25

Matt Curry has posted a screencast about some of the updates that he's made to the CakePHP Debug Kit:

I've been doing some upgrades on the CakePHP DebugKit and wanted to share them with everyone. I figured doing a quick screencast would be faster then writing a post. Was I wrong. It took me like an hour to record this, even though the running time is just over two minutes.

Included in the updates is the ability to select a page from the History and get all of the statistics for that request (instead of just teh current page like it was before). You can grab this latest version from his page on github: http://github.com/mcurry/debug_kit/tree/master.

0 comments voice your opinion now!
cakephp debugkit javascript tool framework history session timer memory


DevShed:
Comparing Files and Databases with PHP Benchmarking Applications
May 08, 2008 @ 07:58:38

DevShed is wrapping up their series looking at benchmarking your PHP applications with the third part - a look at comparing execution times of scripts that can either pull from a database or from a flat file.

This large, complex subject offers numerous possibilities for experimentation, which means that you'll surely have tons of fun creating timing systems with PHP. [...] his article, then, will be focused on evaluating different scripts that fetch sets of records, first from a database, and then from flat files.

They use the Timer class they defined in a previous part of the series and wrap it around both a database class (pulling user information from a MySQL database) and a fetch to a flat file for similar information. General exceptions are handled as a part of the resource connection class.

1 comment voice your opinion now!
database file compare timer class tutorial exception benchmark


DevShed:
Using Timers to Benchmark PHP Applications
April 30, 2008 @ 14:31:08

DevShed has posted the second article in their series looking at benchmarking your PHP scripts. This time they look at the use of "timers" to check on script execution length.

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.

They create a few classes that connect to a database and pull out rows (handing it off to a Result class). They use these classes in two examples - one with compression (output buffering) and one without using their Timer class to evaluate the differences.

0 comments voice your opinion now!
timer benchmark application tutorial class mysql row output buffering


PHP-GTK Community Site:
Three Widgets and a Timer Class
May 31, 2007 @ 10:26:00

The PHP-GTK website has four new posts highlighting three different widgets and a Timer class to make working with delays in applications simpler:

Keep an eye on the Code Snippets section of the PHP-GTK website for more helpful tips and tricks.

2 comments voice your opinion now!
timer codesnippet widget terminal dial scrolling label timer codesnippet widget terminal dial scrolling label


Spindrop.us:
Digg-style AJAX comment editing in PHP/symfony
August 14, 2006 @ 08:10:15

Users of the site Digg will know how the commenting works. It allows you, through a series of Ajax calls and other information, to edit the comments that you've made for a certain amount of time right on the page. It's a handy feature, and in this new posting over on Spindrop.us, they show you how to create it (with the help of symfony).

It's pretty straight forward. For all of your posted comments you check if the owner of them is viewing them within 3 minutes of posting the commen. 3 minutes is usually enough time to notice you made a typo, but if you disagree I'll leave it to you to figure out how to adjust the code.

For example, I make a comment, realize I spelled something wrong and then I can click on my comment to edit it. Of course using AJAX means this all happens without having to reload the web page. Therefore the edits are seemingly quick. So let's add it to any web site.

He steps you through the process, first creating the DIV for the each of the comments, then some Javascript to make it editable. He then creates a timer to monitor how long it's been since the comment to limit the editing to three minutes. Finally, the code bits to load the text from the database and to save the text back in once it's been edited.

6 comments voice your opinion now!
ajax symfony digg comment editing form timer tutorial ajax symfony digg comment editing form timer tutorial



Community Events





Don't see your event here?
Let us know!


conference release voicesoftheelephpant community laravel podcast artisanfiles framework series version composer language security symfony list library tool introduction opinion interview

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework