Module: deluge
Branch: 1.2-stable
Commit: dfdcf117b457e784eac370a7c78b695480dc69aa

Author: Damien Churchill <[email protected]>
Date:   Fri Feb 26 14:49:19 2010 +0000

Fix silly error from last commit

---

 deluge/ui/web/web.py |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/deluge/ui/web/web.py b/deluge/ui/web/web.py
index b87d1d4..961642b 100644
--- a/deluge/ui/web/web.py
+++ b/deluge/ui/web/web.py
@@ -60,7 +60,7 @@ class Web(_UI):
             help="Sets the port to be used for the webserver",
             action="store", default=None)
         group.add_option("--profile", dest="profile",
-            help="Profile the web server code"
+            help="Profile the web server code",
             action="store_true", default=False)
         try:
             import OpenSSL
@@ -118,6 +118,15 @@ class Web(_UI):
         self.server.install_signal_handlers()
         self.server.start()
 
+        if self.options.profile:
+            hsp.stop()
+            hsp.close()
+            import hotshot.stats
+            stats = 
hotshot.stats.load(deluge.configmanager.get_config_dir("deluge-web.profile"))
+            stats.strip_dirs()
+            stats.sort_stats("time", "calls")
+            stats.print_stats(400)
+
 def start():
     web = Web()
     web.start()

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to