Closed mabdinur closed 1 day ago
CODEOWNERS
have been resolved as:
ddtrace/_monkey.py @DataDog/apm-core-python
ddtrace/settings/asm.py @DataDog/asm-python
Regression test? is there a benchmark we'd expect to improve with this change? or should we have a performance regression test to help validate what this improves?
Regression test? is there a benchmark we'd expect to improve with this change? or should we have a performance regression test to help validate what this improves?
There isn't a particular benchmark I am trying to improve. I just don't see the value in patching these operations if IAST or ASM is disabled (we double check if iast/ASM is enabled in the wrappers). If folks don't see value in this change I can close this PR too.
Benchmark execution time: 2024-11-22 22:18:46
Comparing candidate commit d35e45f89ff7e7f459c2a8f3ad574af15e522c42 in PR branch munir/asm-avoid-unnecessary-patching
with baseline commit b2a7d785c2141ad16ec1a2e56f2cce05d81c4159 in branch main
.
Found 0 performance improvements and 8 performance regressions! Performance is the same for 380 metrics, 2 unstable metrics.
execution_time
[+385.764ns; +442.563ns] or [+7.134%; +8.184%]execution_time
[+1.314µs; +1.421µs] or [+9.561%; +10.340%]execution_time
[+510.162ns; +551.812ns] or [+15.109%; +16.343%]execution_time
[+645.676ns; +703.272ns] or [+17.374%; +18.924%]execution_time
[+409.567ns; +484.874ns] or [+7.785%; +9.217%]execution_time
[+300.407ns; +330.398ns] or [+11.866%; +13.051%]execution_time
[+717.136ns; +767.051ns] or [+18.240%; +19.509%]execution_time
[+563.041ns; +610.106ns] or [+15.398%; +16.685%]
Avoids patching
builtins.open
,_io.BytesIO.read
,_io.StringIO.read
andos.system
when IAST is disabled.Checklist
Reviewer Checklist