pax_global_header 0000666 0000000 0000000 00000000064 13556513067 0014525 g ustar 00root root 0000000 0000000 52 comment=b1321eb4f8bb85438b107d4fa154b646ddfd18b0
erp5-b1321eb4f8bb85438b107d4fa154b646ddfd18b0-erp5_administration-SkinTemplateItem/ 0000775 0000000 0000000 00000000000 13556513067 0026640 5 ustar 00root root 0000000 0000000 erp5_administration/ 0000775 0000000 0000000 00000000000 13556513067 0032541 5 ustar 00root root 0000000 0000000 erp5-b1321eb4f8bb85438b107d4fa154b646ddfd18b0-erp5_administration-SkinTemplateItem SkinTemplateItem/ 0000775 0000000 0000000 00000000000 13556513067 0035760 5 ustar 00root root 0000000 0000000 erp5-b1321eb4f8bb85438b107d4fa154b646ddfd18b0-erp5_administration-SkinTemplateItem/erp5_administration portal_skins/ 0000775 0000000 0000000 00000000000 13556513067 0040470 5 ustar 00root root 0000000 0000000 erp5-b1321eb4f8bb85438b107d4fa154b646ddfd18b0-erp5_administration-SkinTemplateItem/erp5_administration/SkinTemplateItem erp5_administration/ 0000775 0000000 0000000 00000000000 13556513067 0044450 5 ustar 00root root 0000000 0000000 erp5-b1321eb4f8bb85438b107d4fa154b646ddfd18b0-erp5_administration-SkinTemplateItem/erp5_administration/SkinTemplateItem/portal_skins ERP5Site_getProfiler.xml 0000664 0000000 0000000 00000002640 13556513067 0051076 0 ustar 00root root 0000000 0000000 erp5-b1321eb4f8bb85438b107d4fa154b646ddfd18b0-erp5_administration-SkinTemplateItem/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration
_functiongetProfiler_modulepprofileguardAAAAAAAAAAI=idERP5Site_getProfilertitlerolesManager
ERP5Site_getStatisticalProfilerAndThread.xml 0000664 0000000 0000000 00000002710 13556513067 0055054 0 ustar 00root root 0000000 0000000 erp5-b1321eb4f8bb85438b107d4fa154b646ddfd18b0-erp5_administration-SkinTemplateItem/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration
_functiongetStatisticalProfilerAndThread_modulepprofileguardAAAAAAAAAAI=idERP5Site_getStatisticalProfilerAndThreadtitlerolesManager
ERP5Site_profileContext.py 0000664 0000000 0000000 00000004433 13556513067 0051453 0 ustar 00root root 0000000 0000000 erp5-b1321eb4f8bb85438b107d4fa154b646ddfd18b0-erp5_administration-SkinTemplateItem/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration """
Profile the whole execution of a callable.
Always raises, in order to allow profiling repeatedly in the same initial conditions code which would otherwise modify databases.
Writes result to response directly.
args (tuple)
kw (dict)
Positional and keyword arguments to pass to profiled callable.
func (None, callable)
Profiled callable, or context if not provided.
statistic (bool)
Whether to use deterministic or statistic profiling.
Deterministic is more detailed and easier to read, but has a very large performance cost (10x slower). It is best suited for profiling code which normally runs in a few seconds.
Statistic is less detailed and harder to read, but has an extremely small performance cost. It is best suited for profiling code which normally takes at least 10s to run.
base_name (None, str):
Value to include in the name of result file, to help categorise your own results.
When None, produced file names are of the format: {cachegrind.out.|statistical_}YYYYmmddHHMMSS{|.zip}
Otherwise, produced file names are of the format: {cachegrind.out.|statistical_}${base_name}_YYYYmmddHHMMSS{|.zip}
zipfile (bool)
When true, the result is a zip file containing profiling result along with the python code (and, when not possible, the disassembled bytecode) of all files which appear in the profiling result.
When false, the result is a bare profiling result (cachegrind file format).
"""
from StringIO import StringIO
portal = context.getPortalObject()
if statistic:
profiler, retriever = portal.ERP5Site_getStatisticalProfilerAndThread(single=True)
else:
profiler = retriever = portal.ERP5Site_getProfiler()
kw = dict(kw)
if func is None:
func = context
with retriever:
func(*args, **kw)
response = context.REQUEST.RESPONSE
filename = DateTime().strftime('%Y%m%d%H%M%S')
if base_name:
filename = base_name + '_' + filename
if zipfile:
data, content_type = profiler.asZip()
filename = 'statistical_' + filename + '.zip'
else:
out = StringIO()
profiler.callgrind(out, relative_path=True)
data = out.getvalue()
content_type = 'application/x-kcachegrind'
filename = 'cachegrind.out.' + filename
response.setHeader('content-type', content_type)
response.setHeader('content-disposition', 'attachment; filename="' + filename + '"')
response.write(data)
raise Exception('profiling')
ERP5Site_profileContext.xml 0000664 0000000 0000000 00000005620 13556513067 0051622 0 ustar 00root root 0000000 0000000 erp5-b1321eb4f8bb85438b107d4fa154b646ddfd18b0-erp5_administration-SkinTemplateItem/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration
Script_magic3_bind_names_paramsargs=(), kw=(), func=None, statistic=False, base_name=None, zipfile=TrueguardAAAAAAAAAAI=idERP5Site_profileContextrolesManager
ERP5Site_profileProcess.py 0000664 0000000 0000000 00000003436 13556513067 0051447 0 ustar 00root root 0000000 0000000 erp5-b1321eb4f8bb85438b107d4fa154b646ddfd18b0-erp5_administration-SkinTemplateItem/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration """
Profile all threads from current process.
Spawns an extra thread (which is ignored in the profiling) to periodically take snapshots of all threads' call stacks.
The source code line of each innermost stack entry gets one hit, and all its callers are remembered as such.
Returns result and sets some response headers.
duration (number):
How long to sample for.
Larger values will produce more detailed results.
Smaller values will produce more noisy results.
base_name (None, str):
Value to include in the name of result file, to help categorise your own results.
When None, produced file names are of the format: {cachegrind.out.|statistical_}YYYYmmddHHMMSS{|.zip}
Otherwise, produced file names are of the format: {cachegrind.out.|statistical_}${base_name}_YYYYmmddHHMMSS{|.zip}
zipfile (bool)
When true, the result is a zip file containing profiling result along with the python code (and, when not possible, the disassembled bytecode) of all files which appear in the profiling result.
When false, the result is a bare profiling result (cachegrind file format).
"""
from time import sleep
from StringIO import StringIO
profiler, thread = context.ERP5Site_getStatisticalProfilerAndThread(single=False)
with thread:
sleep(duration)
response = context.REQUEST.RESPONSE
filename = DateTime().strftime('%Y%m%d%H%M%S')
if base_name:
filename = base_name + '_' + filename
if zipfile:
data, content_type = profiler.asZip()
filename = 'statistical_' + filename + '.zip'
else:
out = StringIO()
profiler.callgrind(out, relative_path=True)
data = out.getvalue()
content_type = 'application/x-kcachegrind'
filename = 'cachegrind.out.' + filename
response.setHeader('content-type', content_type)
response.setHeader('content-disposition', 'attachment; filename="' + filename + '"')
return data
ERP5Site_profileProcess.xml 0000664 0000000 0000000 00000005561 13556513067 0051620 0 ustar 00root root 0000000 0000000 erp5-b1321eb4f8bb85438b107d4fa154b646ddfd18b0-erp5_administration-SkinTemplateItem/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration
Script_magic3_bind_names_paramsduration=60, base_name=None, zipfile=TrueguardAAAAAAAAAAI=idERP5Site_profileProcessrolesManager