From cfa442faaf1967bf6cc848005e645da74a86915d Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 15 Mar 2005 00:27:46 +0000 Subject: [PATCH] disconnect on magic subrequest, and record message processing time git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@227 9efc2488-bf62-4759-914b-345cdb29e865 --- src/perlmods/OpenSRF/Application.pm | 1 + src/perlmods/OpenSRF/Transport.pm | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/perlmods/OpenSRF/Application.pm b/src/perlmods/OpenSRF/Application.pm index 2e15519..ca3230c 100644 --- a/src/perlmods/OpenSRF/Application.pm +++ b/src/perlmods/OpenSRF/Application.pm @@ -415,6 +415,7 @@ sub run { $req->respond( $remote_resp->content ); } $remote_req->finish(); + $session->disconnect(); $session->finish(); } catch Error with { diff --git a/src/perlmods/OpenSRF/Transport.pm b/src/perlmods/OpenSRF/Transport.pm index 3859409..f9b5a4c 100644 --- a/src/perlmods/OpenSRF/Transport.pm +++ b/src/perlmods/OpenSRF/Transport.pm @@ -1,6 +1,7 @@ package OpenSRF::Transport; use strict; use warnings; use base 'OpenSRF'; +use Time::HiRes qw/time/; use OpenSRF::DOM; use OpenSRF::AppSession; use OpenSRF::Utils::Logger qw(:level); @@ -75,6 +76,7 @@ the handler method on the message document. =cut sub handler { + my $start_time = time(); my( $class, $service, $data ) = @_; $logger->transport( "Transport handler() received $data", INTERNAL ); @@ -142,6 +144,7 @@ sub handler { } } + # cycle through and pass each oilsMessage contained in the message # up to the message layer for processing. for my $msg ($doc->documentElement->childNodes) { @@ -185,6 +188,7 @@ sub handler { } + $logger->debug(sprintf("Message processing duration: %.3fs",(time() - $start_time)), DEBUG); return $app_session; } -- 2.11.0