Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Mar 21, 2025

Backport 5c8fb46 from #12833 to 3.3.

        start = None
        if hasattr(self, "_self_acquired_at"):
            # _self_acquired_at is only set when the acquire was captured
            # if it's not set, we're not capturing the release
            start = self._self_acquired_at
            del self._self_acquired_at

Above code can raise an AttributeError, if there are multiple threads calling on release(). Though in such scenarios, except for the thread which actually held and released the lock, such threads would result in a RuntimeError, the current behavior makes customers blame our code instead of theirs.

The following code, by @nsrip-dd, can be used to check whether the code raises an error or not

import threading
import sys

sys.setswitchinterval(0.0000001)

def unlock(l):
    try:
        l.release()
    except RuntimeError:
        pass
    except Exception as e:
        raise e

while True:
    l = threading.Lock()
    l.acquire()
    threads = [threading.Thread(target=unlock, args=[l,]) for _ in range(64)]
    for t in threads:
        t.start()
    for t in threads:
        t.join()

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

```Python
        start = None
        if hasattr(self, "_self_acquired_at"):
            # _self_acquired_at is only set when the acquire was captured
            # if it's not set, we're not capturing the release
            start = self._self_acquired_at
            del self._self_acquired_at
```

Above code can raise an `AttributeError`, if there are multiple threads
calling on `release()`. Though in such scenarios, except for the thread
which actually held and released the lock, such threads would result in
a `RuntimeError`, the current behavior makes customers blame our code
instead of theirs.

The following code, by @nsrip-dd, can be used to check whether the code
raises an error or not

```Python
import threading
import sys

sys.setswitchinterval(0.0000001)

def unlock(l):
    try:
        l.release()
    except RuntimeError:
        pass
    except Exception as e:
        raise e

while True:
    l = threading.Lock()
    l.acquire()
    threads = [threading.Thread(target=unlock, args=[l,]) for _ in range(64)]
    for t in threads:
        t.start()
    for t in threads:
        t.join()
```

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

(cherry picked from commit 5c8fb46)
@github-actions github-actions bot added the Profiling Continous Profling label Mar 21, 2025
@github-actions github-actions bot requested review from a team as code owners March 21, 2025 16:39
@github-actions github-actions bot requested review from avara1986 and tabgok March 21, 2025 16:39
@taegyunkim taegyunkim closed this Mar 21, 2025
@taegyunkim taegyunkim reopened this Mar 21, 2025
@github-actions
Copy link
Contributor Author

CODEOWNERS have been resolved as:

releasenotes/notes/profiling-self-acquired-at-963cadba71ac62b8.yaml     @DataDog/apm-python
ddtrace/profiling/collector/_lock.py                                    @DataDog/profiling-python

@taegyunkim taegyunkim enabled auto-merge (squash) March 21, 2025 16:45
@github-actions
Copy link
Contributor Author

github-actions bot commented Mar 21, 2025

Bootstrap import analysis

Comparison of import times between this PR and main.

Summary

The average import time in this PR is: 256 ± 6 ms.

The average import time in main is: 256 ± 8 ms.

The import time difference between this PR and main is: -0.3 ± 0.3 ms.

The difference is not statistically significant (z = -1.02).

Import time breakdown

The following import paths have appeared:

ddtrace.auto 43.865 ms (17.13%)
ddtrace 43.865 ms (17.13%)
ddtrace.internal.module 43.553 ms (17.01%)
ddtrace.internal.wrapping.context 19.372 ms (7.57%)
ddtrace.internal.wrapping 18.304 ms (7.15%)
bytecode 15.276 ms (5.97%)
bytecode.bytecode 12.044 ms (4.70%)
bytecode.flags 11.484 ms (4.49%)
bytecode.instr 10.358 ms (4.05%)
dataclasses 5.623 ms (2.20%)
inspect 4.765 ms (1.86%)
ast 2.353 ms (0.92%)
_ast 1.217 ms (0.48%)
copy 0.202 ms (0.08%)
dis 0.882 ms (0.34%)
bytecode.utils 0.163 ms (0.06%)
opcode 0.608 ms (0.24%)
_opcode 0.173 ms (0.07%)
bytecode.cfg 2.729 ms (1.07%)
bytecode.concrete 1.365 ms (0.53%)
struct 0.378 ms (0.15%)
_struct 0.234 ms (0.09%)
bytecode.version 0.244 ms (0.10%)
ddtrace.internal.wrapping.asyncs 1.511 ms (0.59%)
ddtrace.internal.wrapping.generators 0.742 ms (0.29%)
ddtrace.internal.assembly 0.389 ms (0.15%)
contextvars 0.293 ms (0.11%)
_contextvars 0.158 ms (0.06%)
pathlib 9.172 ms (3.58%)
fnmatch 4.321 ms (1.69%)
re 4.073 ms (1.59%)
enum 2.045 ms (0.80%)
functools 0.710 ms (0.28%)
_functools 0.063 ms (0.02%)
re._compiler 1.347 ms (0.53%)
re._parser 0.801 ms (0.31%)
re._constants 0.360 ms (0.14%)
re._casefix 0.130 ms (0.05%)
_sre 0.073 ms (0.03%)
copyreg 0.183 ms (0.07%)
urllib.parse 3.499 ms (1.37%)
ipaddress 1.974 ms (0.77%)
math 0.311 ms (0.12%)
urllib 0.132 ms (0.05%)
ntpath 0.496 ms (0.19%)
nt 0.340 ms (0.13%)
_winapi 0.071 ms (0.03%)
errno 0.057 ms (0.02%)
ddtrace.internal.logger 6.524 ms (2.55%)
logging 6.207 ms (2.42%)
traceback 2.864 ms (1.12%)
linecache 1.347 ms (0.53%)
tokenize 1.189 ms (0.46%)
token 0.181 ms (0.07%)
_tokenize 0.039 ms (0.02%)
textwrap 0.945 ms (0.37%)
string 0.693 ms (0.27%)
_string 0.038 ms (0.01%)
threading 0.618 ms (0.24%)
atexit 0.043 ms (0.02%)
typing 3.513 ms (1.37%)
contextlib 0.659 ms (0.26%)
collections.abc 0.180 ms (0.07%)
_typing 0.042 ms (0.02%)
collections 1.792 ms (0.70%)
operator 0.355 ms (0.14%)
_operator 0.071 ms (0.03%)
reprlib 0.192 ms (0.07%)
keyword 0.141 ms (0.06%)
itertools 0.117 ms (0.05%)
_collections 0.067 ms (0.03%)
weakref 0.750 ms (0.29%)
_weakrefset 0.221 ms (0.09%)
importlib.util 0.577 ms (0.23%)
types 0.270 ms (0.11%)
importlib._abc 0.200 ms (0.08%)
ddtrace.internal.utils 0.349 ms (0.14%)
importlib._bootstrap 0.198 ms (0.08%)
importlib 0.174 ms (0.07%)
ddtrace.internal 0.187 ms (0.07%)
importlib.machinery 0.053 ms (0.02%)
warnings 0.312 ms (0.12%)

The following import paths have disappeared:

ddtrace.auto 44.811 ms (17.50%)
ddtrace 44.811 ms (17.50%)
ddtrace._logger 37.365 ms (14.60%)
ddtrace.settings._core 21.959 ms (8.58%)
ddtrace.settings 21.959 ms (8.58%)
ddtrace.settings._config 21.453 ms (8.38%)
ddtrace.settings._telemetry 13.373 ms (5.22%)
ddtrace.internal.telemetry 13.373 ms (5.22%)
ddtrace.internal.telemetry.writer 13.373 ms (5.22%)
ddtrace.internal.utils.version 13.373 ms (5.22%)
ddtrace.vendor.packaging.version 13.373 ms (5.22%)
ddtrace.vendor.packaging 13.373 ms (5.22%)
ddtrace.vendor 13.373 ms (5.22%)
ddtrace.internal.module 13.373 ms (5.22%)
ddtrace.internal.wrapping.context 12.540 ms (4.90%)
ddtrace.internal.wrapping 11.431 ms (4.46%)
bytecode 8.438 ms (3.30%)
bytecode.bytecode 4.415 ms (1.72%)
bytecode.flags 3.851 ms (1.50%)
bytecode.instr 3.287 ms (1.28%)
bytecode.utils 0.140 ms (0.05%)
bytecode.cfg 3.496 ms (1.37%)
bytecode.concrete 2.020 ms (0.79%)
bytecode.version 0.263 ms (0.10%)
ddtrace.internal.wrapping.asyncs 1.387 ms (0.54%)
ddtrace.internal.wrapping.generators 0.722 ms (0.28%)
ddtrace.internal.assembly 0.490 ms (0.19%)
contextvars 0.320 ms (0.13%)
_contextvars 0.180 ms (0.07%)
ddtrace.internal.utils.cache 6.656 ms (2.60%)
inspect 6.656 ms (2.60%)
ast 2.374 ms (0.93%)
_ast 1.208 ms (0.47%)
dis 1.525 ms (0.60%)
opcode 0.614 ms (0.24%)
_opcode 0.174 ms (0.07%)
importlib.machinery 0.246 ms (0.10%)
importlib 0.174 ms (0.07%)
ddtrace.settings.endpoint_config 1.104 ms (0.43%)
ddtrace.internal.utils.http 1.104 ms (0.43%)
dataclasses 0.761 ms (0.30%)
email.encoders 0.343 ms (0.13%)
base64 0.343 ms (0.13%)
struct 0.343 ms (0.13%)
_struct 0.216 ms (0.08%)
ddtrace._trace.pin 0.320 ms (0.12%)
wrapt 0.320 ms (0.12%)
wrapt.importer 0.320 ms (0.12%)
importlib.util 0.320 ms (0.12%)
importlib._abc 0.198 ms (0.08%)
ddtrace._hooks 0.506 ms (0.20%)
ddtrace.internal.logger 0.306 ms (0.12%)
copy 0.200 ms (0.08%)
logging 7.888 ms (3.08%)
traceback 4.476 ms (1.75%)
contextlib 1.479 ms (0.58%)
linecache 1.244 ms (0.49%)
tokenize 1.086 ms (0.42%)
token 0.182 ms (0.07%)
_tokenize 0.038 ms (0.01%)
textwrap 0.916 ms (0.36%)
collections.abc 0.173 ms (0.07%)
string 0.684 ms (0.27%)
_string 0.037 ms (0.01%)
weakref 0.443 ms (0.17%)
warnings 0.316 ms (0.12%)
atexit 0.047 ms (0.02%)
ddtrace.internal.utils.formats 4.762 ms (1.86%)
ddtrace.internal.compat 4.414 ms (1.72%)
pathlib 3.055 ms (1.19%)
urllib.parse 1.462 ms (0.57%)
math 0.247 ms (0.10%)
urllib 0.129 ms (0.05%)
ntpath 0.484 ms (0.19%)
nt 0.320 ms (0.13%)
_winapi 0.071 ms (0.03%)
fnmatch 0.161 ms (0.06%)
errno 0.055 ms (0.02%)
ipaddress 1.359 ms (0.53%)
ddtrace.internal.utils 0.348 ms (0.14%)
typing 2.756 ms (1.08%)
_typing 0.042 ms (0.02%)
ddtrace.internal._unpatched 7.446 ms (2.91%)
json 6.245 ms (2.44%)
json.decoder 6.245 ms (2.44%)
re 6.245 ms (2.44%)
enum 4.226 ms (1.65%)
functools 2.104 ms (0.82%)
collections 1.404 ms (0.55%)
reprlib 0.193 ms (0.08%)
itertools 0.187 ms (0.07%)
keyword 0.139 ms (0.05%)
_collections 0.072 ms (0.03%)
_functools 0.054 ms (0.02%)
operator 0.461 ms (0.18%)
_operator 0.081 ms (0.03%)
types 0.280 ms (0.11%)
re._compiler 1.325 ms (0.52%)
re._parser 0.654 ms (0.26%)
re._constants 0.274 ms (0.11%)
re._casefix 0.214 ms (0.08%)
_sre 0.071 ms (0.03%)
copyreg 0.180 ms (0.07%)
threading 1.012 ms (0.40%)
_weakrefset 0.317 ms (0.12%)
ddtrace.internal 0.190 ms (0.07%)

The following import paths have grown:

ddtrace.auto 26.169 ms (10.22%)
ddtrace 22.438 ms (8.76%)
ddtrace._logger 14.557 ms (5.69%)
ddtrace.settings._core 13.929 ms (5.44%)
ddtrace.settings 13.929 ms (5.44%)
ddtrace.settings._config 13.691 ms (5.35%)
ddtrace.settings.endpoint_config 4.520 ms (1.77%)
ddtrace.internal.utils.http 4.183 ms (1.63%)
http.client 2.790 ms (1.09%)
email.parser 2.342 ms (0.91%)
email.feedparser 2.226 ms (0.87%)
email._policybase 1.923 ms (0.75%)
email.utils 1.440 ms (0.56%)
email._parseaddr 0.920 ms (0.36%)
calendar 0.817 ms (0.32%)
locale 0.623 ms (0.24%)
_locale 0.095 ms (0.04%)
socket 0.399 ms (0.16%)
array 0.196 ms (0.08%)
_socket 0.118 ms (0.05%)
email.header 0.437 ms (0.17%)
email.quoprimime 0.117 ms (0.05%)
email.base64mime 0.107 ms (0.04%)
email.charset 0.102 ms (0.04%)
email.errors 0.191 ms (0.07%)
email.message 0.214 ms (0.08%)
email._encoded_words 0.115 ms (0.04%)
http 0.121 ms (0.05%)
ddtrace.internal.http 0.688 ms (0.27%)
ddtrace.internal.runtime 0.461 ms (0.18%)
uuid 0.210 ms (0.08%)
_uuid 0.100 ms (0.04%)
ddtrace.internal.forksafe 0.129 ms (0.05%)
ddtrace.internal.runtime.container 0.121 ms (0.05%)
email.encoders 0.577 ms (0.23%)
base64 0.268 ms (0.10%)
binascii 0.131 ms (0.05%)
email 0.108 ms (0.04%)
quopri 0.092 ms (0.04%)
ddtrace.internal.uds 0.127 ms (0.05%)
ddtrace.internal.utils.retry 0.226 ms (0.09%)
__future__ 0.110 ms (0.04%)
ddtrace.internal.gitmetadata 3.500 ms (1.37%)
ddtrace.ext.ci 2.668 ms (1.04%)
ddtrace.ext.git 2.365 ms (0.92%)
shutil 0.759 ms (0.30%)
bz2 0.312 ms (0.12%)
_bz2 0.116 ms (0.05%)
_compression 0.098 ms (0.04%)
lzma 0.209 ms (0.08%)
_lzma 0.116 ms (0.05%)
zlib 0.043 ms (0.02%)
subprocess 0.583 ms (0.23%)
fcntl 0.114 ms (0.04%)
_posixsubprocess 0.114 ms (0.04%)
select 0.110 ms (0.04%)
selectors 0.099 ms (0.04%)
msvcrt 0.038 ms (0.01%)
random 0.535 ms (0.21%)
bisect 0.217 ms (0.08%)
_bisect 0.120 ms (0.05%)
_sha2 0.112 ms (0.04%)
_random 0.110 ms (0.04%)
ddtrace.internal.utils.time 0.205 ms (0.08%)
datetime 0.140 ms (0.05%)
_datetime 0.117 ms (0.05%)
tempfile 0.171 ms (0.07%)
ddtrace.ext 0.127 ms (0.05%)
platform 0.042 ms (0.02%)
_wmi 0.042 ms (0.02%)
ddtrace.settings._core 0.709 ms (0.28%)
ddtrace.internal.native 0.264 ms (0.10%)
ddtrace.internal.native._native 0.147 ms (0.06%)
envier 0.200 ms (0.08%)
envier.env 0.087 ms (0.03%)
ddtrace.settings._otel_remapper 0.120 ms (0.05%)
ddtrace.settings._telemetry 2.300 ms (0.90%)
ddtrace.internal.telemetry 2.168 ms (0.85%)
ddtrace.internal.telemetry.writer 2.061 ms (0.80%)
ddtrace.internal.utils.version 0.759 ms (0.30%)
ddtrace.vendor.packaging.version 0.660 ms (0.26%)
ddtrace.vendor.packaging 0.108 ms (0.04%)
ddtrace.vendor 0.108 ms (0.04%)
ddtrace.internal.periodic 0.362 ms (0.14%)
ddtrace.internal._threads 0.124 ms (0.05%)
ddtrace.internal.service 0.124 ms (0.05%)
ddtrace.internal.encoding 0.349 ms (0.14%)
ddtrace.internal._encoding 0.227 ms (0.09%)
ddtrace.internal.atexit 0.251 ms (0.10%)
ddtrace.internal.utils.signals 0.131 ms (0.05%)
ddtrace.internal.agent 0.100 ms (0.04%)
ddtrace.internal.telemetry.data 0.053 ms (0.02%)
ddtrace.internal.packages 0.053 ms (0.02%)
ddtrace.settings.third_party 0.053 ms (0.02%)
ddtrace._trace.pin 1.391 ms (0.54%)
wrapt 1.124 ms (0.44%)
wrapt.__wrapt__ 0.391 ms (0.15%)
wrapt._wrappers 0.144 ms (0.06%)
wrapt.wrappers 0.122 ms (0.05%)
wrapt.weakrefs 0.179 ms (0.07%)
wrapt.decorators 0.171 ms (0.07%)
wrapt.arguments 0.126 ms (0.05%)
wrapt.patches 0.136 ms (0.05%)
wrapt.importer 0.123 ms (0.05%)
ddtrace._trace 0.102 ms (0.04%)
ddtrace.internal.schema 1.343 ms (0.52%)
ddtrace.internal.schema.span_attribute_schema 1.225 ms (0.48%)
ddtrace.settings._inferred_base_service 0.122 ms (0.05%)
ddtrace.settings.integration 0.256 ms (0.10%)
ddtrace.internal.utils.attrdict 0.135 ms (0.05%)
ddtrace.internal.serverless 0.138 ms (0.05%)
ddtrace.settings.http 0.135 ms (0.05%)
ddtrace.internal.utils.cache 0.108 ms (0.04%)
ddtrace._hooks 0.120 ms (0.05%)
ddtrace.internal.utils.formats 0.513 ms (0.20%)
ddtrace.internal.constants 0.255 ms (0.10%)
ddtrace.constants 0.131 ms (0.05%)
ddtrace.internal.compat 0.074 ms (0.03%)
ddtrace.internal._unpatched 7.400 ms (2.89%)
json 7.265 ms (2.84%)
json.decoder 7.013 ms (2.74%)
json.scanner 6.910 ms (2.70%)
_json 6.835 ms (2.67%)
json.encoder 0.136 ms (0.05%)
gc 0.084 ms (0.03%)
ddtrace.trace 0.296 ms (0.12%)
ddtrace._trace.tracer 0.199 ms (0.08%)
ddtrace.internal.debug 0.119 ms (0.05%)
ddtrace.internal.dogstatsd 0.080 ms (0.03%)
ddtrace.vendor.dogstatsd 0.080 ms (0.03%)
ddtrace.vendor.dogstatsd.base 0.080 ms (0.03%)
ddtrace.vendor.dogstatsd.container 0.080 ms (0.03%)
ddtrace._trace.filters 0.098 ms (0.04%)
ddtrace._trace.processor 0.098 ms (0.04%)
ddtrace._trace.sampler 0.098 ms (0.04%)
ddtrace._trace.span 0.098 ms (0.04%)
ddtrace._trace._span_pointer 0.098 ms (0.04%)
ddtrace._trace.telemetry 0.098 ms (0.04%)
ddtrace.internal._file_queue 0.124 ms (0.05%)
secrets 0.124 ms (0.05%)
ddtrace._monkey 0.062 ms (0.02%)
ddtrace.appsec 0.062 ms (0.02%)
ddtrace.internal.core 0.062 ms (0.02%)
ddtrace.vendor.debtcollector 0.062 ms (0.02%)
ddtrace.vendor.debtcollector.renames 0.062 ms (0.02%)
ddtrace.bootstrap.sitecustomize 3.730 ms (1.46%)
ddtrace.bootstrap.preload 2.708 ms (1.06%)
ddtrace.internal.products 1.536 ms (0.60%)
ddtrace.internal.symbol_db.remoteconfig 1.162 ms (0.45%)
ddtrace.internal.remoteconfig._connectors 0.926 ms (0.36%)
ctypes 0.926 ms (0.36%)
ddtrace.internal.symbol_db.symbols 0.085 ms (0.03%)
ddtrace.internal.safety 0.085 ms (0.03%)
multiprocessing.sharedctypes 0.080 ms (0.03%)
multiprocessing.heap 0.080 ms (0.03%)
mmap 0.080 ms (0.03%)
multiprocessing 0.071 ms (0.03%)
multiprocessing.context 0.071 ms (0.03%)
importlib.metadata 0.135 ms (0.05%)
importlib.abc 0.068 ms (0.03%)
importlib.resources 0.068 ms (0.03%)
importlib.resources._common 0.068 ms (0.03%)
importlib.resources._adapters 0.068 ms (0.03%)
importlib.metadata._adapters 0.066 ms (0.03%)
ddtrace.internal.remoteconfig.client 0.091 ms (0.04%)
ddtrace.internal.remoteconfig._pubsub 0.091 ms (0.04%)
ddtrace.internal.remoteconfig._publishers 0.091 ms (0.04%)
ddtrace.settings.dynamic_instrumentation 0.080 ms (0.03%)
ddtrace.internal.uwsgi 0.068 ms (0.03%)
ddtrace.settings.profiling 1.018 ms (0.40%)
ddtrace.vendor.psutil 0.920 ms (0.36%)
ddtrace.internal.tracemethods 0.097 ms (0.04%)
ddtrace.internal.flare.flare 0.057 ms (0.02%)
logging.handlers 0.057 ms (0.02%)
ddtrace._trace.trace_handlers 1.022 ms (0.40%)
ddtrace._trace.utils_botocore.span_tags 0.917 ms (0.36%)
ddtrace._trace.utils_botocore.aws_payload_tagging 0.917 ms (0.36%)
ddtrace.vendor.jsonpath_ng 0.917 ms (0.36%)
ddtrace.vendor.jsonpath_ng.parser 0.862 ms (0.34%)
ddtrace.vendor.ply.yacc 0.862 ms (0.34%)
ddtrace.vendor.jsonpath_ng.jsonpath 0.055 ms (0.02%)
ddtrace.vendor.jsonpath_ng.lexer 0.055 ms (0.02%)
ddtrace._trace.utils 0.060 ms (0.02%)
ddtrace._trace._inferred_proxy 0.045 ms (0.02%)

The following import paths have shrunk:

ddtrace.auto 24.062 ms (9.40%)
ddtrace 18.887 ms (7.38%)
ddtrace._logger 16.451 ms (6.43%)
ddtrace.settings._core 16.451 ms (6.43%)
ddtrace.settings 16.451 ms (6.43%)
ddtrace.settings._config 16.451 ms (6.43%)
ddtrace.settings._telemetry 14.893 ms (5.82%)
ddtrace.internal.telemetry 14.893 ms (5.82%)
ddtrace.internal.telemetry.writer 14.893 ms (5.82%)
ddtrace.internal.utils.version 14.745 ms (5.76%)
ddtrace.vendor.packaging.version 14.745 ms (5.76%)
ddtrace.vendor.packaging 14.702 ms (5.74%)
ddtrace.vendor.packaging._structures 0.042 ms (0.02%)
ddtrace.internal.telemetry.data 0.115 ms (0.05%)
ddtrace.internal.packages 0.115 ms (0.05%)
ddtrace.internal.telemetry.constants 0.033 ms (0.01%)
ddtrace.settings.endpoint_config 0.817 ms (0.32%)
ddtrace.internal.utils.http 0.817 ms (0.32%)
http.client 0.817 ms (0.32%)
ssl 0.817 ms (0.32%)
_ssl 0.235 ms (0.09%)
ddtrace.internal.gitmetadata 0.741 ms (0.29%)
ddtrace.ext.ci 0.741 ms (0.29%)
platform 0.741 ms (0.29%)
ddtrace.trace 0.537 ms (0.21%)
ddtrace._trace.filters 0.279 ms (0.11%)
ddtrace._trace.processor 0.247 ms (0.10%)
ddtrace._trace.sampler 0.091 ms (0.04%)
ddtrace._trace.span 0.091 ms (0.04%)
ddtrace.internal.sampling 0.091 ms (0.04%)
ddtrace.internal.rate_limiter 0.091 ms (0.04%)
ddtrace._trace.tracer 0.258 ms (0.10%)
ddtrace.internal.dogstatsd 0.120 ms (0.05%)
ddtrace.vendor.dogstatsd 0.120 ms (0.05%)
ddtrace.vendor.dogstatsd.base 0.120 ms (0.05%)
queue 0.120 ms (0.05%)
_queue 0.120 ms (0.05%)
ddtrace._monkey 0.137 ms (0.05%)
ddtrace.settings.asm 0.137 ms (0.05%)
ddtrace.bootstrap.sitecustomize 5.175 ms (2.02%)
ddtrace.bootstrap.preload 4.861 ms (1.90%)
ddtrace.internal.products 3.512 ms (1.37%)
ddtrace.internal.symbol_db.remoteconfig 1.474 ms (0.58%)
multiprocessing 1.134 ms (0.44%)
multiprocessing.context 1.134 ms (0.44%)
multiprocessing.reduction 1.044 ms (0.41%)
pickle 1.044 ms (0.41%)
_compat_pickle 1.044 ms (0.41%)
multiprocessing.process 0.090 ms (0.04%)
multiprocessing.sharedctypes 0.120 ms (0.05%)
multiprocessing.heap 0.120 ms (0.05%)
multiprocessing.util 0.120 ms (0.05%)
ddtrace.internal.symbol_db.symbols 0.114 ms (0.04%)
ddtrace.settings.symbol_db 0.114 ms (0.04%)
ddtrace.internal.remoteconfig._connectors 0.106 ms (0.04%)
ddtrace.internal.remoteconfig.client 0.763 ms (0.30%)
importlib.metadata 0.280 ms (0.11%)
csv 0.110 ms (0.04%)
importlib.abc 0.092 ms (0.04%)
importlib.resources 0.092 ms (0.04%)
importlib.resources._common 0.092 ms (0.04%)
importlib.metadata._collections 0.078 ms (0.03%)
ddtrace.debugging._config 0.084 ms (0.03%)
ddtrace.settings.exception_replay 0.084 ms (0.03%)
ddtrace.settings.profiling 1.127 ms (0.44%)
ddtrace.vendor.psutil 1.127 ms (0.44%)
ddtrace.vendor.psutil._pslinux 1.127 ms (0.44%)
ddtrace.vendor.psutil._psutil_linux 0.104 ms (0.04%)
ddtrace.settings.crashtracker 0.125 ms (0.05%)
ddtrace.internal.datadog.profiling.crashtracker 0.125 ms (0.05%)
ddtrace.internal.datadog.profiling.crashtracker._crashtracker 0.125 ms (0.05%)
ddtrace.internal.flare._subscribers 0.097 ms (0.04%)
ddtrace._trace.trace_handlers 0.313 ms (0.12%)
ddtrace._trace.utils_botocore.span_pointers 0.111 ms (0.04%)
ddtrace._trace.utils_botocore.span_pointers.dynamodb 0.111 ms (0.04%)
ddtrace._trace.utils_botocore.span_tags 0.106 ms (0.04%)
ddtrace._trace.utils_botocore.aws_payload_tagging 0.106 ms (0.04%)
ddtrace.vendor.jsonpath_ng 0.106 ms (0.04%)
ddtrace.vendor.jsonpath_ng.jsonpath 0.106 ms (0.04%)
ddtrace.vendor.jsonpath_ng.lexer 0.106 ms (0.04%)
ddtrace.vendor.ply.lex 0.106 ms (0.04%)
ddtrace._trace._inferred_proxy 0.096 ms (0.04%)
ddtrace.propagation.http 0.096 ms (0.04%)

@pr-commenter
Copy link

pr-commenter bot commented Mar 21, 2025

Benchmarks

Benchmark execution time: 2025-03-21 20:37:11

Comparing candidate commit b3dfe0e in PR branch backport-12833-to-3.3 with baseline commit 4bf3c4d in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 456 metrics, 2 unstable metrics.

@taegyunkim taegyunkim merged commit a81c54e into 3.3 Mar 21, 2025
310 of 319 checks passed
@taegyunkim taegyunkim deleted the backport-12833-to-3.3 branch March 21, 2025 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Profiling Continous Profling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants