Definition at line 11 of file lsprofcalltree.py.
◆ __init__()
def python.ext.lsprofcalltree.KCacheGrind.__init__ |
( |
|
self, |
|
|
|
profiler |
|
) |
| |
◆ _entry()
def python.ext.lsprofcalltree.KCacheGrind._entry |
( |
|
self, |
|
|
|
entry |
|
) |
| |
|
private |
Definition at line 30 of file lsprofcalltree.py.
30 def _entry(self, entry):
31 out_file = self.out_file
33 inlinetime =
int(entry.inlinetime * 1000)
35 if isinstance(code, str):
36 print(
'fi=~', file=out_file)
38 print(
'fi=%s' % (code.co_filename,), file=out_file)
40 if isinstance(code, str):
41 print(
'0 ', inlinetime, file=out_file)
43 print(
'%d %d' % (code.co_firstlineno, inlinetime), file=out_file)
49 if isinstance(code, str):
52 lineno = code.co_firstlineno
53 for subentry
in calls:
54 self._subentry(lineno, subentry)
◆ _print_summary()
def python.ext.lsprofcalltree.KCacheGrind._print_summary |
( |
|
self | ) |
|
|
private |
Definition at line 23 of file lsprofcalltree.py.
23 def _print_summary(self):
25 for entry
in self.data:
26 totaltime =
int(entry.totaltime * 1000)
27 max_cost =
max(max_cost, totaltime)
28 print(
'summary: %d' % (max_cost,), file=self.out_file)
◆ _subentry()
def python.ext.lsprofcalltree.KCacheGrind._subentry |
( |
|
self, |
|
|
|
lineno, |
|
|
|
subentry |
|
) |
| |
|
private |
Definition at line 57 of file lsprofcalltree.py.
57 def _subentry(self, lineno, subentry):
58 out_file = self.out_file
60 totaltime =
int(subentry.totaltime * 1000)
62 print(
'cfn=%s' % (
label(code),), file=out_file)
63 if isinstance(code, str):
64 print(
'cfi=~', file=out_file)
65 print(
'calls=%d 0' % (subentry.callcount,), file=out_file)
67 print(
'cfi=%s' % (code.co_filename,), file=out_file)
68 print(
'calls=%d %d' % (
69 subentry.callcount, code.co_firstlineno), file=out_file)
70 print(
'%d %d' % (lineno, totaltime), file=out_file)
◆ output()
def python.ext.lsprofcalltree.KCacheGrind.output |
( |
|
self, |
|
|
|
out_file |
|
) |
| |
Definition at line 16 of file lsprofcalltree.py.
16 def output(self, out_file):
17 self.out_file = out_file
18 print(
'events: Ticks', file=out_file)
20 for entry
in self.data:
◆ data
python.ext.lsprofcalltree.KCacheGrind.data |
◆ out_file
python.ext.lsprofcalltree.KCacheGrind.out_file |
The documentation for this class was generated from the following file: