Skip to content

Commit

Permalink
[python] scenario with DD_PROFILING_EXPORT_LIBDD_ENABLED (#46)
Browse files Browse the repository at this point in the history
* 3.11_libdd

* install rust

* fix symlink

* print out time

* use libdd dockerfile

* install rust for 3.10 scenario

* Discard changes to correctness_test.go

* remove unnecessary parts

* Discard changes to .gitignore

* increase timeout for python

* change to trigger actions

* increase time out

* timeout for step not job

* Discard changes to .github/workflows/test.yml

* increase timeout on go test

* Discard changes to .github/workflows/test.yml

* Discard changes to scenarios/python_basic_3.11/requirements.txt

* pin version

* Update requirements.txt

* Discard changes to base_images/Dockerfile.python-3.11-ddprof

* update
  • Loading branch information
taegyunkim authored Sep 10, 2024
1 parent 304bbbe commit add5bb0
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 5 deletions.
2 changes: 2 additions & 0 deletions base_images/Dockerfile.python-3.10
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ FROM python:3.10
ENV DD_PROFILING_ENABLED true
ENV DD_TRACE_ENABLED false
ENV DD_TRACE_DEBUG true
ENV DD_PROFILING_EXPORT_LIBDD_ENABLED 0
ENV DD_PROFILING__FORCE_LEGACY_EXPORTER 1
ENV DD_PROFILING_OUTPUT_PPROF="/app/data/profiles"
2 changes: 1 addition & 1 deletion base_images/Dockerfile.python-3.11
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ ENV DD_PROFILING_ENABLED true
ENV DD_TRACE_ENABLED false
ENV DD_TRACE_DEBUG true
ENV DD_PROFILING_EXPORT_LIBDD_ENABLED 0
ENV DD_PROFILING_EXPORT_PY_ENABLED 1
ENV DD_PROFILING__FORCE_LEGACY_EXPORTER 1
ENV DD_PROFILING_OUTPUT_PPROF="/app/data/profiles"
5 changes: 1 addition & 4 deletions base_images/Dockerfile.python-3.11-libdd
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ ENV DD_PROFILING_ENABLED true
ENV DD_TRACE_ENABLED false
ENV DD_TRACE_DEBUG true
ENV DD_PROFILING_EXPORT_LIBDD_ENABLED 1
ENV DD_PROFILING_EXPORT_PY_ENABLED 0
ENV DD_PROFILING__FORCE_LEGACY_EXPORTER 0
ENV DD_PROFILING_OUTPUT_PPROF="/app/data/profiles"

# Allows wheels in binary folder to be considered
COPY ./binaries /app
21 changes: 21 additions & 0 deletions scenarios/python_basic_3.11_libdd/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ARG BASE_IMAGE="prof-python-3.11-libdd"
FROM $BASE_IMAGE

# Copy the Python target into the container
COPY ./scenarios/python_basic_3.11_libdd/main.py \
./scenarios/python_basic_3.11_libdd/requirements.txt \
/app/
RUN chmod 644 /app/*


# Set the working directory to the location of the program
WORKDIR /app

RUN pip install --no-cache-dir -r requirements.txt

ENV EXECUTION_TIME_SEC="2"

# Run the program when the container starts
CMD python main.py
# CMD ddprof -l notice --preset cpu_live_heap python main.py

1 change: 1 addition & 0 deletions scenarios/python_basic_3.11_libdd/expected_profile.json
1 change: 1 addition & 0 deletions scenarios/python_basic_3.11_libdd/main.py
1 change: 1 addition & 0 deletions scenarios/python_basic_3.11_libdd/requirements.txt

0 comments on commit add5bb0

Please sign in to comment.