File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ # 13주차
2
+
3
+ ## pbd 실행해보기
4
+
5
+ ``` python
6
+ def calculate_performance_improvement_rate (before , after ):
7
+ return (before - after) / after * 100
8
+
9
+
10
+ if __name__ == " __main__" :
11
+ breakpoint ()
12
+
13
+ before_performance = 150
14
+ after_performance = 57
15
+
16
+ performance_improvement_rate = calculate_performance_improvement_rate(before_performance, after_performance)
17
+
18
+ print (f " { performance_improvement_rate:.2f } % " )
19
+
20
+ ```
21
+
22
+ <img width =" 949 " alt =" 스크린샷 2024-06-30 오후 3 02 32 " src =" https://github.com/mikaniz/CPython-Guide/assets/92143119/98669d4b-c3f5-446a-9007-91dca96e791e " >
23
+
24
+
25
+ ## CProfile 예제 파일 직접 생성해서 실행해보기
26
+
27
+ ``` python
28
+ def calculate_performance_improvement_rate (before , after ):
29
+ return (before - after) / after * 100
30
+
31
+
32
+ if __name__ == " __main__" :
33
+ before_performance = 150
34
+ after_performance = 57
35
+
36
+ performance_improvement_rate = calculate_performance_improvement_rate(before_performance, after_performance)
37
+
38
+ print (f " { performance_improvement_rate:.2f } % " )
39
+ ```
40
+
41
+ <img width =" 765 " alt =" 스크린샷 2024-06-30 오후 3 05 17 " src =" https://github.com/mikaniz/CPython-Guide/assets/92143119/9443b947-b7a6-4ca7-ad78-2d74af9f62c9 " >
42
+
43
+ <img width =" 1557 " alt =" 스크린샷 2024-06-30 오후 3 06 17 " src =" https://github.com/mikaniz/CPython-Guide/assets/92143119/1a84f527-efbd-4cba-8f6f-6b5cba9ed7ba " >
You can’t perform that action at this time.
0 commit comments