Skip to content

Commit

Permalink
Merge pull request #22 from maxbrunet/feat/python/perf-support
Browse files Browse the repository at this point in the history
feat(python): enable Perf map support
  • Loading branch information
kakkoyun authored Nov 22, 2022
2 parents d53806b + ad3b0e9 commit 2d22388
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
10 changes: 6 additions & 4 deletions python/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM python:3.10-alpine
FROM python:3.12-rc-bullseye

WORKDIR /usr/src/app
ENV PYTHONPERFSUPPORT=1

COPY . .
WORKDIR /app

CMD [ "python", "./main.py" ]
COPY main.py .

CMD [ "python", "main.py" ]
3 changes: 3 additions & 0 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Python

See https://docs.python.org/3.12/howto/perf_profiling.html#perf-profiling
4 changes: 3 additions & 1 deletion python/main.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import time
import time


def fibonacci(n):
if n == 1 or n == 2:
return 1
else:
return fibonacci(n - 1) + fibonacci(n - 2)


while True:
print(fibonacci(42))
time.sleep(1)

0 comments on commit 2d22388

Please sign in to comment.