Stress testing and profiling tools for web application

Hi there,

Recently I came across some cool new tools along with some of my old favorites and thought this calls for a quick post -

Front End Profiling Tool:

FireBug: Firebug is pretty handy to find out how long it is taking your website to load and render as well as how many header calls are made to fetch external java-script and css files. It also packs lots of useful tools and a must have for any serious web application developer.

YSlow:YSlow sort of gives your an easy to understand report on your web pages flaws and how to overcome them.

Web Server Stress Testing Tool:

Siege: Siege is a command line tool that you can install and simulate concurrent hits to any particular URL.

Example:

siege -c 10 -r 10 http://www.mydomain.com/

Above code pings the URL concurrently with 10 connections repeating 10 times making 100 hits to the URL.

MySQL database Profiling Tool:

Jet Profiler:Jet profiler Shows the real time activity of the connected mysql database once its hooked up. It is pretty useful when used together with the siege tool and see how concurrent hits affect the database.


Naturally these are not all that is out there so any new inputs from the readers will be most welcomed :)





thanks,

faisal ahmed

web application developer
web: http://www.faisalbd.com/
email: thephpx(at)gmail(dot)com

Share

Dummies guide to LAMP setup on linux :)

Hello everyone,


Recently I came across several nifty apt-get commands that quite handy and if used properly can be a life saver while setting up LAMP stack on your system.


Step 1 : One line LAMP setup on linux -

  1. sudo apt-get install lamp-server^



Step 2 : Setup phpMyadmin to manage your mysql databases -

  1. sudo apt-get install phpmyadmin



Step 3 : Setup xdebug and integrate with php5 installation -

  1. sudo apt-get install php5-xdebug



Step 4 : Setup cURL -

  1. sudo apt-get install php5-curl



After the above command finishes installing curl do the following -

  1. cd /etc/php5/conf.d/
  2. sudo gedit xdebug.ini



After opening the file in gedit, add the following lines at the end of the file then save and close it.

  1. xdebug.remote_enable=On
  2. xdebug.remote_host="localhost"
  3. xdebug.remote_port=9000
  4. xdebug.remote_handler="dbgp"



The following step is helpful for those who later want to integrate andorid SDK, because only Sun JDK is supported when running the android SDK app, is handy if you use it.


Step 5 : Setup sun -

  1. sudo apt-get install sun-java6



Step 6 : Enable Rewrite Module for PHP -

  1. a2enmod rewrite





The above will do a smooth install of a functioning LAMP server on the system :D , comments and queries are always welcomed.


thanks,

faisal ahmed

web application developer
web: http://www.faisalbd.com/
email: thephpx(at)gmail(dot)com

Share

Google Oauth2 library for CodeIgniter framework

Hello everyone,

I am back with google oauth2 integration library this time. Before you use the google oauth2 library you must have a google application registered so that you have access to api client id and client key which you will need to use it.

Also the redirect url must match your application location. Otherwise google does not provide access to the api. So, best way to test the code is to test it on a live site.

I am not going to go through the code here as I have commented the code well enough for you to understand :)

For any extra query feel free to comment.

DOWNLOAD THE LIBRARY

thanks,

faisal ahmed

web application developer
web: http://www.faisalbd.com/
email: thephpx(at)gmail(dot)com

Share

Codeigniter: Helper for template library dynamic view partial loading

Hello everyone,

I have recently been in quick-fire blogging mode. After playing with the superb template library developed by Phil Sturgeon.

The following template helper is the outcome of tweaking that makes life easier while setting up view partials and calling them inside the layout dynamically. The helper also has an add-on use which gives user the option to use region specific partial loading.

Controller:

welcome.php

$partial_list[]['region'] = 'left';
$partial_list[]['name'] = 'category';
$partial_list[]['view'] = 'partial_category';
$partial_list[]['region'] = 'right';
$partial_list[]['name'] = 'login_box';
$partial_list[]['view'] = 'partial_login';

/* following functionautomatically sets the partials
* based on the above array and also passes $partial_list
* variable to the view.
*/

/*
* make sure the pareser helper is loaded before
* calling this function
*/

setup_partials($partial_list);

$this->template->set_layout('home_layout');
$this->template->build('home_view');


Layout:

home_view.php

<html>
<head>
	<title><?php echo $template['title'];?></title>
</head>
<body>
	<div class="left">
		/* Will show only partials with region set as left */
		<?php show_partials('list', 'left', $partial_list, $template); ?>
	</div>
	<div class="mid"><?php echo $template['body'];?></div>
	<div class="right">
		/* Will show only partials with region set as right */
		<?php show_partials('list', 'right', $partial_list, $template);?>
	</div>
</body>
</html>

Detail about the usage can be found in the actual helper file, also feel free to comment here and I will try my best to help out.

Download Helper:

DOWNLOAD PARSER HELPER

thanks,

faisal ahmed

web application developer
web: http://www.faisalbd.com/
email: thephpx(at)gmail(dot)com

Share

Internet explorer compatibility test with expression web super preview

In the recent past I was involved in couple of UI development and cross browser integration and its during this time I came across “expression web super preview” , which comes from Microsoft for FREE :P

This application can be called an AIO (all in one) IE test suit in terms of UI consistency checks. It allows you to compare different version of the same site in 2 different version of the internet explorer side by side. It also has the option to view the site in various screen resolutions.

I felt it was too nice a product to be shared online and hope it remains free till something else comes up :) only downside is I can use it only on windows systems only.

To download the application click here.

thanks,

thephpx

Share