From 427928bd7949c5f1fcf20b74cc553ac941ac9ef2 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 21 Jun 2005 14:43:08 +0000 Subject: [PATCH] removed connect since math_bench runs in stateless mode git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@370 9efc2488-bf62-4759-914b-345cdb29e865 --- examples/math_bench.pl | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/examples/math_bench.pl b/examples/math_bench.pl index ac9f55b..18cd68d 100755 --- a/examples/math_bench.pl +++ b/examples/math_bench.pl @@ -29,15 +29,6 @@ warn "PID: $$\n"; OpenSRF::System->bootstrap_client(); my $session = OpenSRF::AppSession->create( "opensrf.math" ); -try { - if( ! ($session->connect()) ) { die "Connect timed out\n"; } - -} catch OpenSRF::EX with { - my $e = shift; - warn "Connection Failed *\n"; - die $e; -} - my @times; my %vals = ( add => 3, sub => -1, mult => 2, div => 0.5 ); @@ -58,6 +49,7 @@ for my $scale ( 1..$count ) { try { $starttime = time(); + if( ! ($session->connect()) ) { die "Connect timed out\n"; } $req = $session->request( $mname, 1, 2 ); $resp = $req->recv( timeout => 10 ); push @times, time() - $starttime; @@ -87,7 +79,7 @@ for my $scale ( 1..$count ) { } else { print "*NADA*"; } $req->finish(); - $session->disconnect(); +# $session->disconnect(); $c++; } -- 2.11.0