diff -r fc2442492606 -r 80df04266a16 mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Sun Aug 14 16:03:30 2016 -0700 +++ b/mercurial/hgweb/hgwebdir_mod.py Sun Aug 14 18:37:24 2016 -0700 @@ -31,6 +31,7 @@ encoding, error, hg, + profiling, scmutil, templater, ui as uimod, @@ -217,7 +218,9 @@ return False def run_wsgi(self, req): - return self._runwsgi(req) + with profiling.maybeprofile(self.ui): + for r in self._runwsgi(req): + yield r def _runwsgi(self, req): try: