RE: Help with my perl script
- From: Will.Rutherdale@xxxxxxxxxx (Will Rutherdale)
- Date: Wed, 23 Aug 2006 14:11:52 -0400
This is not really a DBI question, because, although your testing is
over DBI, the capabilities you're asking about concern elementary Perl.
Try
$ man perlfunc
and you will see there is a fork() function available standard in Perl
that lets you run multiple copies of the same code as separate
processes. The child code can then connect to DBI and run your testing
suite.
-Will
-----Original Message-----
From: joe bayer [mailto:joebayerii@xxxxxxxxx]
Sent: Wednesday 23 August 2006 14:05
To: dbi-users@xxxxxxxx
Subject: Help with my perl script
Group,
I am trying to write a load testing script.
The script goes like this:
++++++++++++++++++++++++++++++++++
my $j = 0;
while ($j < 300)
{
$dbh[$j] = DBI->connect ( "dbi:Oracle:$instance[$i]",
"$username[$i]",
"$passwd[$i]",
{
PrintError => 1,
RaiseError => 1,
AutoCommit => 1
}
) || die "Database Connection not made
$DBI::errstr" ;# Create a Database
#do some random, endless select statement here.
$j++;
}
++++++++++++++++++++++++++++++++++++++++++
What I want is 300 session do the select statement
simultaneously. But this script will do one session after another.
Do I REALLY have to start 300 perl script in order to this
testing, or there is some way in perl that one script can
start up 300 session and do their invidual select simultaneously?
Thanks for your help.
Joe
---------------------------------
All-new Yahoo! Mail - Fire up a more powerful email and get
things done faster.
- - - - - Appended by Scientific Atlanta, a Cisco company - - - - -
This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.
.
- References:
- Help with my perl script
- From: Joe Bayer
- Help with my perl script
- Prev by Date: Help with my perl script
- Next by Date: DBD-DBM too slow
- Previous by thread: Help with my perl script
- Next by thread: Re: Help with my perl script
- Index(es):
Relevant Pages
|