| Server IP : 82.208.35.60 / Your IP : 216.73.217.39 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/textproc/py-docutils/work-py39/docutils-0.17.1/tools/dev/ |
Upload File : |
#!/usr/bin/python -i
# $Id: profile_docutils.py 8346 2019-08-26 12:11:32Z milde $
# Author: Lea Wiemann <LeWiemann@gmail.com>
# Copyright: This script has been placed in the public domain.
from __future__ import print_function
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.txt',
destination_path='prof.HISTORY.html', writer_name='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:
pass