SF.net SVN: docutils:[10040 ] trunk/docutils/tools/dev /profile_docutils.py
aa-turner--- via Docutils-checkins <[email protected]> Sat, 08 Mar 2025 19:05:40 +0000
| Newsgroups | gmane.text.docutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 10040
http://sourceforge.net/p/docutils/code/10040
Author: aa-turner
Date: 2025-03-08 19:05:40 +0000 (Sat, 08 Mar 2025)
Log Message:
-----------
Remove profile_docutils.py
This script relied on the hotshot [1] module, which was removed in
Python 3.0. It has not been substantively maintained or changed since
2005, when the script was first added.
[1] https://docs.python.org/2.7/library/hotshot.html
Removed Paths:
-------------
trunk/docutils/tools/dev/profile_docutils.py
Deleted: trunk/docutils/tools/dev/profile_docutils.py
===================================================================
--- trunk/docutils/tools/dev/profile_docutils.py 2025-03-08 18:53:20 UTC (rev 10039)
+++ trunk/docutils/tools/dev/profile_docutils.py 2025-03-08 19:05:40 UTC (rev 10040)
@@ -1,39 +0,0 @@
-#!/usr/bin/env -S python3 -i
-
-# $Id$
-# Author: Lea Wiemann <[email protected]>
-# Copyright: This script has been placed in the public domain.
-
-import os.path
-import docutils.core
-import hotshot.stats
-
-print('Profiler started.')
-
-os.chdir(os.path.join(os.path.dirname(docutils.__file__), '..'))
-
-print('Profiling...')
-
-prof = hotshot.Profile('docutils.prof')
-prof.runcall(docutils.core.publish_file, source_path='HISTORY.rst',
- destination_path='prof.HISTORY.html', writer='html')
-prof.close()
-
-print('Loading statistics...')
-
-print("""
-stats = hotshot.stats.load('docutils.prof')
-stats.strip_dirs()
-stats.sort_stats('time') # 'cumulative'; 'calls'
-stats.print_stats(40)
-""")
-
-stats = hotshot.stats.load('docutils.prof')
-stats.strip_dirs()
-stats.sort_stats('time')
-stats.print_stats(40)
-
-try:
- exec(open(os.environ['PYTHONSTARTUP']).read())
-except Exception:
- pass
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.