summaryrefslogtreecommitdiffstats
path: root/askbot/bin
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-06-20 23:15:55 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-06-20 23:15:55 -0400
commit946d4f5fdabfe5bf74e33dae072085444c2c47d2 (patch)
tree4c6931d0e3945841040fc0bf19b5d7a5fb0799e2 /askbot/bin
parent7134a8a516bdee8100572327c49771eec30bd256 (diff)
downloadaskbot-946d4f5fdabfe5bf74e33dae072085444c2c47d2.tar.gz
askbot-946d4f5fdabfe5bf74e33dae072085444c2c47d2.tar.bz2
askbot-946d4f5fdabfe5bf74e33dae072085444c2c47d2.zip
made loading of front page a little faster, commented out buggy code in models/__init__.py
Diffstat (limited to 'askbot/bin')
-rw-r--r--askbot/bin/show_profile_stats.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/askbot/bin/show_profile_stats.py b/askbot/bin/show_profile_stats.py
new file mode 100644
index 00000000..ae31d49a
--- /dev/null
+++ b/askbot/bin/show_profile_stats.py
@@ -0,0 +1,14 @@
+#!python
+"""script for digesting profiling output
+to profile functions, wrap them into decorator @profile('file_name.prof')
+
+source: http://code.djangoproject.com/wiki/ProfilingDjango
+"""
+
+import hotshot.stats
+import sys
+
+stats = hotshot.stats.load(sys.argv[1])
+#stats.strip_dirs()
+stats.sort_stats('time', 'calls')
+stats.print_stats(20)