-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(iast): add local debug scripts to find leaks #9318
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 147843 Passed, 28595 Skipped, 9h 20m 57.19s Total duration (2h 53m 10.12s time saved) ⌛ Performance Regressions vs Default Branch (1)
|
BenchmarksBenchmark execution time: 2024-05-21 17:49:42 Comparing candidate commit 56f678e in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 209 metrics, 9 unstable metrics. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9318 +/- ##
===========================================
- Coverage 76.22% 10.35% -65.87%
===========================================
Files 1289 1259 -30
Lines 122509 120663 -1846
===========================================
- Hits 93386 12499 -80887
- Misses 29123 108164 +79041 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks handy, thanks for adding :)
After a second thought and check, I'm realizing these scripts also get included when we build ddtracepy 🤔 Should we be storing these debug scripts elsewhere? |
Thanks for a second check @erikayasuda! I add an extra thought and, why are we not skipping all script folder when we build ddtrace-py? 😛 https://github.com/DataDog/dd-trace-py/blob/main/setup.py#L471 setup(
name="ddtrace",
packages=find_packages(exclude=["tests*", "benchmarks*"]), |
Like that @erikayasuda? 👉 #9324 |
Yesss 🥳 Thanks for updating! |
Add to the repository the scripts that @juanjux and I use to debug C++ leaks. This folder (scripts/iast/) contains some scripts to check the memory usage of native code.
1. Build the docker image
docker build . -f docker/Dockerfile_py311_debug_mode -t python_311_debug
2. Run the docker container
2.1. Run the container with the script to find references (this script will run the memory usage check)
2.2. Run the container with the script with memray usage check
2.3. Run the container with the script with Max RSS
Checklist
changelog/no-changelog
is set@DataDog/apm-tees
.@DataDog/security-design-and-guidance
.Reviewer Checklist