Mercurial > moin > 1.9
changeset 1234:e38e27967a97
added more timers to xapian code
author | Franz Pletz <fpletz AT franz-pletz DOT org> |
---|---|
date | Tue, 08 Aug 2006 16:30:24 +0200 |
parents | 79ac7ab77ea8 |
children | c6ae37934d31 |
files | MoinMoin/search/builtin.py docs/CHANGES.fpletz |
diffstat | 2 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/search/builtin.py Tue Aug 08 15:50:05 2006 +0200 +++ b/MoinMoin/search/builtin.py Tue Aug 08 16:30:24 2006 +0200 @@ -394,17 +394,20 @@ Get a list of pages using fast xapian search and return moin search in those pages. """ + clock = self.request.clock pages = None index = self._xapianIndex(self.request) if index and self.query.xapian_wanted(): - self.request.clock.start('_xapianSearch') + clock.start('_xapianSearch') try: from MoinMoin.support import xapwrap + clock.start('_xapianQuery') query = self.query.xapian_term(self.request, index.allterms) self.request.log("xapianSearch: query = %r" % query.get_description()) query = xapwrap.index.QObjQuery(query) enq, hits = index.search(query) + clock.stop('_xapianQuery') self.request.log("xapianSearch: finds: %r" % hits) def dict_decode(d): """ decode dict values to unicode """ @@ -424,9 +427,13 @@ try: if not self.query.xapian_need_postproc(): - return self._getHits(hits, self._xapianMatch) + clock.start('_xapianProcess') + try: + return self._getHits(hits, self._xapianMatch) + finally: + clock.stop('_xapianProcess') finally: - self.request.clock.stop('_xapianSearch') + clock.stop('_xapianSearch') return self._moinSearch(pages)
--- a/docs/CHANGES.fpletz Tue Aug 08 15:50:05 2006 +0200 +++ b/docs/CHANGES.fpletz Tue Aug 08 16:30:24 2006 +0200 @@ -221,3 +221,6 @@ * bugfix for results code: sometimes we never got a page instance in Found{Page,Attachment,...} which yielded strange errors +2006-08-08 + * added some more timers for regression testing +