-
Notifications
You must be signed in to change notification settings - Fork 411
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(internal): remove time functions from compat module #10861
base: main
Are you sure you want to change the base?
Conversation
|
Datadog ReportBranch report: ✅ 0 Failed, 592 Passed, 694 Skipped, 18m 33.31s Total duration (18m 43.51s time saved) |
BenchmarksBenchmark execution time: 2024-09-30 16:08:15 Comparing candidate commit f2548ac in PR branch Found 8 performance improvements and 0 performance regressions! Performance is the same for 363 metrics, 53 unstable metrics. scenario:iast_aspects-aspect_iast_do_lower
scenario:iast_aspects-aspect_iast_do_lstrip
scenario:iast_aspects-aspect_iast_do_modulo
scenario:iast_aspects-aspect_iast_do_repr
scenario:iast_aspects-aspect_iast_do_slice
scenario:iast_aspects-aspect_iast_do_str
scenario:iast_aspects-aspect_iast_do_title
scenario:iast_aspects-aspect_iast_do_upper
|
…raujo/remove-compat-time-ns
This PR removes 4 time-related functions from
ddtrace.internal.compat
that existed for compatibility with Python < 3.7, and replaces all uses with the corresponding functions from the builtintime
module:time_ns
,monotonic
,monotonic_ns
,process_time_ns
.The original motivation for this was noticing that the fallback code for
time_ns
had the wrong multiplier [edit: it's not actually wrong, just written in a weird way], and then checking that we don't really need these functions anymore, as we only support Python >= 3.7.Checklist
Reviewer Checklist