Skip to content

Commit e8ba455

Browse files
committed
Add example
1 parent cfd6b68 commit e8ba455

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

docs/commands/running.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,29 @@ When you enable the debugger, it adds overhead and slows down your
2222
program. The overhead is greater than pdb, because the debugger tries to
2323
analyze the program in depth. In most cases, this does not diminish the
2424
debugging experience. But for some instructions, the overhead can be
25-
very large. For example, if you turn on the debugger and run the
25+
very large.
26+
For example, if you turn on the debugger and run the
2627
\`import pandas\` instruction, it can increase your CPU to 100% for a
2728
while.
29+
::
30+
31+
$ cat tmp.py
32+
#!/usr/bin/env python3
33+
import pandas as pd
34+
35+
$ trepan3k tmp.py
36+
(trepan3k) next # that increase your CPU to 100% for a while
2837

2938
The debugger overhead only concerns the instructions of the program to
3039
be debugged, the instructions of the trepan3k interpreter are not
31-
analyzed, so there is no overhead. For example, in trepan3k, do an
40+
analyzed, so there is no overhead.
41+
For example, in trepan3k, do an
3242
\`import pandas\` and you will probably see that things are
3343
instantaneous.
44+
::
45+
46+
$ trepan3k tmp.py
47+
(trepan3k) import pandas as pd # that things are instantaneous
3448

3549
Technique to reduce the overhead costs
3650
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)