diff --git a/blank_script.py b/blank_script.py new file mode 100644 index 0000000..54dd423 --- /dev/null +++ b/blank_script.py @@ -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()