Skip to content

Commit 8712d63

Browse files
committed
code profiling basics
0 parents  commit 8712d63

File tree

9 files changed

+87
-0
lines changed

9 files changed

+87
-0
lines changed

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/code profiling.iml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import time
2+
import cProfile
3+
import pstats
4+
5+
6+
# def fast():
7+
# print('I run fast!')
8+
#
9+
#
10+
# def slow():
11+
# time.sleep(3)
12+
# print('I run slow')
13+
#
14+
#
15+
# def medium():
16+
# time.sleep(0.5)
17+
# print('i run slightly slow')
18+
#
19+
#
20+
# def main():
21+
# fast()
22+
# slow()
23+
# medium()
24+
#
25+
#
26+
#
27+
# cProfile.run()
28+
29+
30+
# if __name__ == '__main__':
31+
# main()
32+
33+
34+
def checker():
35+
name = True
36+
clas = True
37+
if name == True and clas == True:
38+
print('all true')
39+
40+
41+
cProfile.run('checker()')

output.txt

9.59 KB
Binary file not shown.

0 commit comments

Comments
 (0)