summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-02-06 07:58:31 -0500
committerTim Graham <timograham@gmail.com>2015-02-06 07:58:31 -0500
commit388d986b8a6bb1363dab9f53ea435dff4dfe92cb (patch)
tree44710db8cadcba37df4094562a8136769f288c6f
parentaea103b6a599a5e4c71a355b2cac237f067be13b (diff)
downloaddjango-388d986b8a6bb1363dab9f53ea435dff4dfe92cb.tar.gz
Removed gather_profile_stats.py
This script uses the unmaintained hotshot module (gone on Python 3) and doesn't seem to be Django specific in any way.
-rw-r--r--django/bin/profiling/__init__.py0
-rw-r--r--django/bin/profiling/gather_profile_stats.py38
-rw-r--r--docs/man/gather_profile_stats.126
3 files changed, 0 insertions, 64 deletions
diff --git a/django/bin/profiling/__init__.py b/django/bin/profiling/__init__.py
deleted file mode 100644
index e69de29bb2..0000000000
--- a/django/bin/profiling/__init__.py
+++ /dev/null
diff --git a/django/bin/profiling/gather_profile_stats.py b/django/bin/profiling/gather_profile_stats.py
deleted file mode 100644
index dd2733377c..0000000000
--- a/django/bin/profiling/gather_profile_stats.py
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env python
-
-"""
-gather_profile_stats.py /path/to/dir/of/profiles
-
-Note that the aggregated profiles must be read with pstats.Stats, not
-hotshot.stats (the formats are incompatible)
-"""
-
-from hotshot import stats
-import os
-import pstats
-import sys
-
-
-def gather_stats(p):
- profiles = {}
- for f in os.listdir(p):
- if f.endswith('.agg.prof'):
- path = f[:-9]
- prof = pstats.Stats(os.path.join(p, f))
- elif f.endswith('.prof'):
- bits = f.split('.')
- path = ".".join(bits[:-3])
- prof = stats.load(os.path.join(p, f))
- else:
- continue
- print("Processing %s" % f)
- if path in profiles:
- profiles[path].add(prof)
- else:
- profiles[path] = prof
- os.unlink(os.path.join(p, f))
- for (path, prof) in profiles.items():
- prof.dump_stats(os.path.join(p, "%s.agg.prof" % path))
-
-if __name__ == '__main__':
- gather_stats(sys.argv[1])
diff --git a/docs/man/gather_profile_stats.1 b/docs/man/gather_profile_stats.1
deleted file mode 100644
index 72b443726f..0000000000
--- a/docs/man/gather_profile_stats.1
+++ /dev/null
@@ -1,26 +0,0 @@
-.TH "gather_profile_stats.py" "1" "August 2007" "Django Project" ""
-.SH "NAME"
-gather_profile_stats.py \- Performance analysis tool for the Django Web
-framework
-.SH "SYNOPSIS"
-.B python gather_profile_stats.py
-.I <path>
-
-.SH "DESCRIPTION"
-This utility script aggregates profiling logs generated using Python's
-hotshot profiler. The sole command-line argument is the full path to the
-directory containing the profiling logfiles.
-
-.SH "SEE ALSO"
-Discussion of profiling Django applications on the Django project's wiki:
-.sp
-.I https://www.djangoproject.com/wiki/ProfilingDjango
-
-.SH "AUTHORS/CREDITS"
-Originally developed at World Online in Lawrence, Kansas, USA. Refer to the
-AUTHORS file in the Django distribution for contributors.
-
-.SH "LICENSE"
-New BSD license. For the full license text refer to the LICENSE file in the
-Django distribution.
-