changeset 69:cc742990942e

move hotshot profile printing script to contrib/wsgi/, remove script.old package
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 05 Mar 2011 21:44:41 +0100
parents 7a4a72d9e003
children 4a8898e001fc
files MoinMoin/script/old/__init__.py MoinMoin/script/old/print_stats.py contrib/wsgi/print_hotshot_profile.py
diffstat 3 files changed, 39 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/script/old/__init__.py	Thu Mar 03 00:17:23 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-# Copyright: 2004 by Thomas Waldmann
-# License: GNU GPL v2 (or any later version), see LICENSE.txt for details.
-
-"""
-    MoinMoin - misc example Scripts
-"""
-
-
--- a/MoinMoin/script/old/print_stats.py	Thu Mar 03 00:17:23 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#!/usr/bin/env python
-# Copyright: 2005 by MoinMoin:ThomasWaldmann
-# License: GNU GPL v2 (or any later version), see LICENSE.txt for details.
-
-"""
-    MoinMoin - Print statistics gathered by hotshot profiler
-
-    Usage:
-        print_stats.py statsfile
-
-    Typical usage:
-     1. Edit moin.py and activate the hotshot profiler, set profile file name
-     2. Run moin.py
-     3. Do some request, with a browser, script or ab
-     4. Stop moin.py
-     5. Run this tool: print_stats.py moin.prof
-
-    Currently CGI and twisted also have a hotshot profiler integration.
-"""
-
-
-def run():
-    import sys
-    from hotshot import stats
-
-    if len(sys.argv) != 2:
-        print __doc__
-        sys.exit()
-
-    # Load and print stats
-    s = stats.load(sys.argv[1])
-    s.strip_dirs()
-    s.sort_stats('cumulative', 'time', 'calls')
-    s.print_stats(40)
-    s.print_callers(40)
-
-if __name__ == "__main__":
-    run()
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/wsgi/print_hotshot_profile.py	Sat Mar 05 21:44:41 2011 +0100
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+# Copyright: 2005 by MoinMoin:ThomasWaldmann
+# License: GNU GPL v2 (or any later version), see LICENSE.txt for details.
+
+"""
+    MoinMoin - Print statistics gathered by hotshot profiler
+
+    Usage:
+        print_stats.py statsfile
+
+    Typical usage:
+     1. Edit moin.py and activate the hotshot profiler, set profile file name
+     2. Run moin.py
+     3. Do some request, with a browser, script or ab
+     4. Stop moin.py
+     5. Run this tool: print_stats.py moin.prof
+
+    Currently CGI and twisted also have a hotshot profiler integration.
+"""
+
+
+def run():
+    import sys
+    from hotshot import stats
+
+    if len(sys.argv) != 2:
+        print __doc__
+        sys.exit()
+
+    # Load and print stats
+    s = stats.load(sys.argv[1])
+    s.strip_dirs()
+    s.sort_stats('cumulative', 'time', 'calls')
+    s.print_stats(40)
+    s.print_callers(40)
+
+if __name__ == "__main__":
+    run()
+