Mercurial > hg > ZopePubmanConnector
changeset 9:166482535b54
timing output for debugging.
author | casties |
---|---|
date | Fri, 03 May 2013 22:20:56 +0200 |
parents | ddd7e357e518 |
children | 007ba22a5eb1 |
files | zopePubmanConnector.py |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/zopePubmanConnector.py Fri May 03 18:21:56 2013 +0200 +++ b/zopePubmanConnector.py Fri May 03 22:20:56 2013 +0200 @@ -11,6 +11,7 @@ import httplib2 import xml.etree.ElementTree as ET import logging +import time cacheFolder ="/var/tmp/.cacheWWW" @@ -250,8 +251,10 @@ if limit: cn+="&maximumRecords=%s"%limit - logging.debug(cn) + startTime = time.time() + logging.debug("getPublicationsFromContext: getting %s"%cn) resp, content = h.request(cn) + logging.debug("getPublicationsFromContext: got data in %ss"%(time.time()-startTime)) ET.register_namespace("dcterms", "http://purl.org/dc/terms/") @@ -363,7 +366,8 @@ "year":issued} ret.append(item) - + + logging.debug("getPublicationsFromContext: done in %ss"%(time.time()-startTime)) return ret