Skip to content

Conversation

@jd
Copy link
Contributor

@jd jd commented Oct 21, 2021

We test fork(), but we don't test higher level frameworks.
Most Python frameworks using multiple processes are based on multiprocessing.
Add a simple test that shows we do collect profiles for subprocesses when using
multiprocessing.

@jd jd requested a review from a team as a code owner October 21, 2021 13:41
Kyle-Verhoog
Kyle-Verhoog previously approved these changes Oct 21, 2021
mtoffl01
mtoffl01 previously approved these changes Oct 21, 2021
Copy link
Contributor

@mtoffl01 mtoffl01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

@Kyle-Verhoog
Copy link
Member

@jd looks like the path doesn't match up:

>           fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
E           FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pytest-of-root/pytest-4/test_multiprocessing0/pprof.3299.1'

../.pyenv/versions/3.9.1/lib/python3.9/gzip.py:173: FileNotFoundError

@jd jd added the changelog/no-changelog A changelog entry is not required for this PR. label Oct 22, 2021
@jd jd dismissed stale reviews from mtoffl01 and Kyle-Verhoog via 1ae3f0d October 22, 2021 12:56
@jd jd force-pushed the profiling/multiprocessing branch 10 times, most recently from 88950a3 to d43d2b7 Compare October 22, 2021 14:28
We test fork(), but we don't test higher level frameworks.
Most Python frameworks using multiple processes are based on `multiprocessing`.
Add a simple test that shows we do collect profiles for subprocesses when using
multiprocessing.
@jd jd force-pushed the profiling/multiprocessing branch from d43d2b7 to 9f64f0f Compare October 22, 2021 14:31
@codecov-commenter
Copy link

Codecov Report

Merging #2934 (9f64f0f) into master (32c0d96) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2934      +/-   ##
==========================================
- Coverage   84.66%   84.60%   -0.06%     
==========================================
  Files         607      608       +1     
  Lines       44759    44787      +28     
==========================================
  Hits        37894    37894              
- Misses       6865     6893      +28     
Impacted Files Coverage Δ
tests/profiling/_test_multiprocessing.py 0.00% <0.00%> (ø)
tests/profiling/test_main.py 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32c0d96...9f64f0f. Read the comment docs.

@mergify mergify bot merged commit eff9d82 into DataDog:master Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants