summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjortel <devnull@localhost>2011-02-11 16:18:21 +0000
committerjortel <devnull@localhost>2011-02-11 16:18:21 +0000
commitc61299de5f6c840fe381832f130ae3b73d136935 (patch)
treef1573f910dabc19485d0bfda0b852a482d7038f2
parent95fc1e243b97cddfff9afaaee09ba162079db2cc (diff)
downloadsuds-c61299de5f6c840fe381832f130ae3b73d136935.tar.gz
add metrics logging; time wait on server reply.
-rw-r--r--suds/client.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/suds/client.py b/suds/client.py
index 1692b26..8b4f258 100644
--- a/suds/client.py
+++ b/suds/client.py
@@ -622,6 +622,7 @@ class SoapClient:
retxml = self.options.retxml
nosend = self.options.nosend
prettyxml = self.options.prettyxml
+ timer = metrics.Timer()
log.debug('sending to (%s)\nmessage:\n%s', location, soapenv)
try:
self.last_sent(soapenv)
@@ -638,7 +639,10 @@ class SoapClient:
return RequestContext(self, binding, soapenv)
request = Request(location, soapenv)
request.headers = self.headers()
+ timer.start()
reply = transport.send(request)
+ timer.stop()
+ metrics.log.debug('waited %s on server reply', timer)
ctx = plugins.message.received(reply=reply.message)
reply.message = ctx.reply
if retxml: