Created
September 24, 2010 03:49
-
-
Save nekoya/594839 to your computer and use it in GitHub Desktop.
mysql_connect_bench.pl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use common::sense; | |
use Perl6::Say; | |
use DBI; | |
use Time::HiRes qw/gettimeofday tv_interval/; | |
my $t0 = [gettimeofday]; | |
for (1 .. 1000) { | |
my $dbh = DBI->connect('dbi:mysql:database=test;host=db', 'bench', 'password') or die; | |
$dbh->disconnect or die; | |
} | |
my $t1 = [gettimeofday]; | |
say tv_interval($t0, $t1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment