/opt/cloudlinux/venv/bin
NameSizeModeActions
activate16910644editdlrm
activate.csh9150644editdlrm
activate.fish21910644editdlrm
Activate.ps190330644editdlrm
alembic2290755editdlrm
cagefsctl_user.py159250755editdlrm
cagefs_enter_site.py18770755editdlrm
chardetect2370755editdlrm
clcpapi54090755editdlrm
cl_sysctl46200755editdlrm
coverage2310755editdlrm
coverage-3.112310755editdlrm
coverage32310755editdlrm
cpanel-dbmapping39290755editdlrm
crontab-user-wrapper.py44010755editdlrm
da_suid_caller.py6860644editdlrm
detect-requirements2380755editdlrm
dodgy2240755editdlrm
epylint2350755editdlrm
f2py2320755editdlrm
f2py32320755editdlrm
f2py3.112320755editdlrm
flake82300755editdlrm
futurize2310755editdlrm
get_gprof18850755editdlrm
get_objgraph16670755editdlrm
isort2250755editdlrm
isort-identify-imports2590755editdlrm
jsonschema2290755editdlrm
lvestats_config_reader.py11450644editdlrm
mako-render2290755editdlrm
normalizer2600755editdlrm
pasteurize2330755editdlrm
pip2370755editdlrm
pip32370755editdlrm
pip3.112370755editdlrm
plesk_suid_caller.py9050644editdlrm
prospector2290755editdlrm
py.test2370755editdlrm
pycodestyle2280755editdlrm
pydocstyle2290755editdlrm
pyflakes2270755editdlrm
pylint2330755editdlrm
pylint-config2490755editdlrm
pyreverse2390755editdlrm
pysemver2250755editdlrm
pytest2370755editdlrm
python153680755editdlrm
python3153680755editdlrm
python3.11153680755editdlrm
raven2350755editdlrm
symilar2350755editdlrm
tap2230755editdlrm
tappy2230755editdlrm
undill6030755editdlrm
virtualenv2540755editdlrm
Edit: /opt/cloudlinux/venv/bin/get_gprof (1885B)
#!/opt/cloudlinux/venv/bin/python3 # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2008-2016 California Institute of Technology. # Copyright (c) 2016-2023 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/dill/blob/master/LICENSE ''' build profile graph for the given instance running: $ get_gprof executes: gprof2dot -f pstats .prof | dot -Tpng -o .call.png where: are arguments for gprof2dot, such as "-n 5 -e 5" is code to create the instance to profile is the class of the instance (i.e. type(instance)) For example: $ get_gprof -n 5 -e 1 "import numpy; numpy.array([1,2])" will create 'ndarray.call.png' with the profile graph for numpy.array([1,2]), where '-n 5' eliminates nodes below 5% threshold, similarly '-e 1' eliminates edges below 1% threshold ''' import sys # grab args for gprof2dot args = sys.argv[1:-1] args = ' '.join(args) # last arg builds the object obj = sys.argv[-1] obj = obj.split(';') # multi-line prep for generating an instance for line in obj[:-1]: exec(line) # one-line generation of an instance obj = eval(obj[-1]) # get object 'name' objtype = type(obj) name = getattr(objtype, '__name__', getattr(objtype, '__class__', objtype)) # profile dumping an object import dill import os import cProfile #name = os.path.splitext(os.path.basename(__file__))[0] cProfile.run("dill.dumps(obj)", filename="%s.prof" % name) msg = "gprof2dot -f pstats %s %s.prof | dot -Tpng -o %s.call.png" % (args, name, name) os.system(msg) # get stats f_prof = "%s.prof" % name import pstats stats = pstats.Stats(f_prof, stream=sys.stdout) stats.strip_dirs().sort_stats('cumtime') stats.print_stats(20) #XXX: save to file instead of print top 20? os.remove(f_prof)