C
Charlie
Hi folks,
I have created some test cases which are written in perl and used to
test some web applications. And I have two issues here about PERL,
1. Let's say in one of my single test case, following events happening
User:
lace_an_order()
Manager::approveOrder()
Approver::approveOrder()
Manger::giveConfirmation()
Each event is being called in a seperate function. The question that I
have is how can I calculate the seconds being used for each function
call? I do not want the timing is that acculate, but simple, and easy
to use.
2. I want to simulate multiple transactions running at the same time
to check the time consuming. The way that I am doing now is by using
the Thread. I am just a beginner for the Thread, and the code that I
am using now is :
"
....
thread1 = Thread->new(\&eachSession);
thread2 = Thread->new(\&eachSession);
$_->join foreach($thread1, $thread2);
....
"
My feeling is it is not scalable, if one thread is broken somewhere,
the whole running will be dead. And it does not make sense to me, as
if I need to have 100 transactions, I need to create 100 threads and
have them joined together.
So any comments? Good module I may use ?
thanks a lot
CJ
I have created some test cases which are written in perl and used to
test some web applications. And I have two issues here about PERL,
1. Let's say in one of my single test case, following events happening
User:
Manager::approveOrder()
Approver::approveOrder()
Manger::giveConfirmation()
Each event is being called in a seperate function. The question that I
have is how can I calculate the seconds being used for each function
call? I do not want the timing is that acculate, but simple, and easy
to use.
2. I want to simulate multiple transactions running at the same time
to check the time consuming. The way that I am doing now is by using
the Thread. I am just a beginner for the Thread, and the code that I
am using now is :
"
....
thread1 = Thread->new(\&eachSession);
thread2 = Thread->new(\&eachSession);
$_->join foreach($thread1, $thread2);
....
"
My feeling is it is not scalable, if one thread is broken somewhere,
the whole running will be dead. And it does not make sense to me, as
if I need to have 100 transactions, I need to create 100 threads and
have them joined together.
So any comments? Good module I may use ?
thanks a lot
CJ