diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2019-12-08 22:10:51 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2019-12-08 22:10:51 +0100 |
| commit | 2e74b1b0caeb0e0490c563635af6bef28a990ec6 (patch) | |
| tree | ebd0fd46184e66db70d2e95fc3cf6e47e2fafe15 /solutions/py/d01.py | |
| parent | d8f929604f18cacc40eec80f3bbd4386757a4902 (diff) | |
| download | aoc-2e74b1b0caeb0e0490c563635af6bef28a990ec6.tar.gz | |
Add cProfiler
Diffstat (limited to 'solutions/py/d01.py')
| -rw-r--r-- | solutions/py/d01.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/solutions/py/d01.py b/solutions/py/d01.py index d5197ab..d1c57c8 100644 --- a/solutions/py/d01.py +++ b/solutions/py/d01.py @@ -17,3 +17,12 @@ def pt1(_in): def pt2(input): return sum([get_fuel(int(line)) for line in input]) + +if __name__ == "__main__": + import cProfile + + input = open("../input/01", "r").readlines() + cProfile.run("pt1(input)") + cProfile.run("pt2(input)") + print(pt1(input)) + print(pt2(input)) |
