Skip to content

Commit

Permalink
(internal): setup flamegraph generation for python generator (#4196)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi authored Aug 3, 2024
1 parent 7ec3428 commit 3684271
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions generators/python/sdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@ COPY ./src ./src
RUN poetry install

ENTRYPOINT ["python", "-m", "src.fern_python.generators.sdk.cli"]

## NOTE: Uncomment the below to generate a flame graph for the python generator.
## To visualize the flamegraph you can run:
## - poetry add snakeviz
## - poetry run snakeviz output.prof
##
## RUN mkdir -p /fern/output
## ENTRYPOINT ["python", "-m", "cProfile", "-o", "/fern/output/output.prof", "/src/fern_python/generators/sdk/cli.py"]

0 comments on commit 3684271

Please sign in to comment.