Skip to content

Commit

Permalink
Create blank_script.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jtstanley authored Nov 30, 2021
1 parent 2b8c8d7 commit 4fa6d07
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions blank_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import cProfile
import pstats
import blank_lib


# Here is main that runs methods from blank_lib
def main():
blank_lib.func()


# Here is the function that profiles main
def profile_main():
with cProfile.Profile() as prof:
main()

stats = pstats.Stats(prof)
stats.sort_stats(pstats.SortKey.TIME)
stats.print_stats()


if __name__ == '__main__':
profile_main()

0 comments on commit 4fa6d07

Please sign in to comment.