mercurial/hgweb/hgweb_mod.py
changeset 29787 80df04266a16
parent 28954 f97a0bcfd7a1
child 30559 d83ca854fa21
--- a/mercurial/hgweb/hgweb_mod.py	Sun Aug 14 16:03:30 2016 -0700
+++ b/mercurial/hgweb/hgweb_mod.py	Sun Aug 14 18:37:24 2016 -0700
@@ -28,6 +28,7 @@
     error,
     hg,
     hook,
+    profiling,
     repoview,
     templatefilters,
     templater,
@@ -305,8 +306,9 @@
         should be using instances of this class as the WSGI application.
         """
         with self._obtainrepo() as repo:
-            for r in self._runwsgi(req, repo):
-                yield r
+            with profiling.maybeprofile(repo.ui):
+                for r in self._runwsgi(req, repo):
+                    yield r
 
     def _runwsgi(self, req, repo):
         rctx = requestcontext(self, repo)