generated from Pseudo-Lab/Jupyter-Book-Template
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
### 1. pdb 실행 | ||
|
||
|shortcut|설명| | ||
|---|---| | ||
|`l`|주변 소스코드를 출력하며 현재 라인이 화살표로 나옴| | ||
|`n`|다음 문장으로 이동| | ||
|`s`|Step Into| | ||
|`w`|함수의 call stack 출력| | ||
|`s`|현재 함수의 argument들을 출력| | ||
|
||
<img src="https://github.com/wooy0ng/wooy0ng/assets/37149278/f66f7214-b2cb-4178-9d1b-dfd27835e1cb" width=600> | ||
|
||
<br><br><hr> | ||
|
||
### 2. CProfile 예제 파일 직접 생성해서 실행해보기 | ||
|
||
``` bash | ||
$ python -m cProfile -o output.pstat portscanner_multithread.py | ||
``` | ||
|
||
<!-- <img src="https://github.com/wooy0ng/wooy0ng/assets/37149278/5e2852a3-c7d5-41fe-a3c8-5b172bd7e954" width=600> --> | ||
|
||
|
||
<br> | ||
|
||
``` bash | ||
$ pip install snakeviz | ||
$ python -m snakeviz output.pstat | ||
``` | ||
|
||
<img src="https://github.com/wooy0ng/wooy0ng/assets/37149278/e1e0e8db-4679-4672-8689-6c3dcfcbe82e" width=1000> |