-
Notifications
You must be signed in to change notification settings - Fork 447
fix(profiling): make explicitly marked main packages "my code" #13649
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
base: main
Are you sure you want to change the base?
Conversation
|
Bootstrap import analysisComparison of import times between this PR and base. SummaryThe average import time from this PR is: 287 ± 3 ms. The average import time from base is: 283 ± 7 ms. The import time difference between this PR and base is: 4.5 ± 0.2 ms. Import time breakdownThe following import paths have grown:
|
BenchmarksBenchmark execution time: 2025-07-14 19:39:26 Comparing candidate commit f89f4a1 in PR branch Found 0 performance improvements and 2 performance regressions! Performance is the same for 546 metrics, 2 unstable metrics. scenario:iastaspects-format_map_aspect
scenario:iastaspectsospath-ospathjoin_aspect
|
354e1d1
to
c700d8e
Compare
If a user runs their code as a "main module" which they installed like a library (`python -m my_program args...`), and expicilty specifies that it's the main package via DD_MAIN_PACKAGE, we should consider code from that module "my code". Right now we don't, though, because we mark that code as a "library" in the profiling code provenance info. Check whether the user specified a main package and make sure it gets marked as "my code" by leaving the kind blank.
c700d8e
to
3c3895d
Compare
# that that's the main package, make sure it shows up as "my code" in | ||
# the UI. Do this by leaving the kind blank (but not deleting the | ||
# library so we can still associate the library with its files) | ||
_, _, main_package = gitmetadata.get_git_tags() |
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.
(unrelated) I find it a bit weird that we have to retrieve this information via a git metadata utility module 🤔
If a user runs their code as a "main module" which they installed like a
library (
python -m my_program args...
), and expicilty specifies thatit's the main package via
DD_MAIN_PACKAGE
, we should consider code fromthat module "my code". Right now we don't, though, because we mark that
code as a "library" in the profiling code provenance info. Check
whether the user specified a main package and make sure it gets marked
as "my code" by leaving the kind blank.
Checklist
Reviewer Checklist