Преглед на файлове

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.
Tim Graham преди 10 години
родител
ревизия
388d986b8a
променени са 3 файла, в които са добавени 0 реда и са изтрити 64 реда
  1. 0 0
      django/bin/profiling/__init__.py
  2. 0 38
      django/bin/profiling/gather_profile_stats.py
  3. 0 26
      docs/man/gather_profile_stats.1

+ 0 - 0
django/bin/profiling/__init__.py


+ 0 - 38
django/bin/profiling/gather_profile_stats.py

@@ -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])

+ 0 - 26
docs/man/gather_profile_stats.1

@@ -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.
-