Skip to content

fix(ci_visibility): count failed/skipped tests in JUnit XML when retries are enabled [backport 3.3] #12898

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

Merged
merged 6 commits into from
Apr 1, 2025

Conversation

vitor-de-araujo
Copy link
Contributor

@vitor-de-araujo vitor-de-araujo commented Mar 26, 2025

Backport 2a506fb from #12862 to 3.3.

The pytest JUnit XML plugin uses the test report's failed and
longrepr properties to count failed tests and include them in the output. Because retried tests have their own special statuses (dd_efd_final_failed, etc), they don't count as failures, and are excluded from the JUnit XML count. This PR creates a subclass of TestReport that is aware of those special statuses and reports them as passed/failed/skipped accordingly.

This is honestly a bit of a hack. It would probably be best to rewrite the retry logic entirely so it would use normal pytest states, and pass the information that they are retries in some other way. But that will take more time, and I would like to fix the bug sooner rather than later.

The exception information for the initial attempt is included in the JUnit XML.

Known issue: quarantined failing tests are not counted. The way forward with this is to rewrite the retry logic, which I plan to do in a future PR.

  • 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 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


Co-authored-by: Federico Mon [email protected]
(cherry picked from commit 2a506fb)

…ies are enabled (#12862)

The pytest JUnit XML plugin uses the test report's
[`failed`](https://github.com/pytest-dev/pytest/blob/8.3.x/src/_pytest/junitxml.py#L562)
and
[`longrepr`](https://github.com/pytest-dev/pytest/blob/8.3.x/src/_pytest/junitxml.py#L201)
properties to count failed tests and include them in the output. Because
retried tests have their own special statuses (`dd_efd_final_failed`,
etc), they don't count as failures, and are excluded from the JUnit XML
count. This PR creates a subclass of TestReport that is aware of those
special statuses and reports them as passed/failed/skipped accordingly.

This is honestly a bit of a hack. It would probably be best to rewrite
the retry logic entirely so it would use normal pytest states, and pass
the information that they are retries in some other way. But that will
take more time, and I would like to fix the bug sooner rather than
later.

The exception information for the initial attempt is included in the JUnit XML.

Known issue: quarantined failing tests are not counted. The way forward
with this is to rewrite the retry logic, which I plan to do in a future
PR.

- [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))

- [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)

---------

Co-authored-by: Federico Mon <[email protected]>
(cherry picked from commit 2a506fb)
Copy link
Contributor

github-actions bot commented Mar 26, 2025

CODEOWNERS have been resolved as:

releasenotes/notes/ci_visibility-fix-junit-xml-retry-count-65de6ad6b9bb35d2.yaml  @DataDog/apm-python
ddtrace/contrib/internal/pytest/_atr_utils.py                           @DataDog/ci-app-libraries
ddtrace/contrib/internal/pytest/_attempt_to_fix.py                      @DataDog/ci-app-libraries
ddtrace/contrib/internal/pytest/_efd_utils.py                           @DataDog/ci-app-libraries
ddtrace/contrib/internal/pytest/_plugin_v2.py                           @DataDog/ci-app-libraries
ddtrace/contrib/internal/pytest/_retry_utils.py                         @DataDog/ci-app-libraries
tests/contrib/pytest/test_pytest_atr.py                                 @DataDog/ci-app-libraries
tests/contrib/pytest/test_pytest_efd.py                                 @DataDog/ci-app-libraries

Copy link
Contributor

github-actions bot commented Mar 26, 2025

Bootstrap import analysis

Comparison of import times between this PR and main.

Summary

The average import time in this PR is: 243 ± 4 ms.

The average import time in main is: 231 ± 2 ms.

The import time difference between this PR and main is: 12.6 ± 0.1 ms.

Import time breakdown

The following import paths have appeared:

ddtrace.auto 129.742 ms (53.30%)
ddtrace 108.735 ms (44.67%)
ddtrace._logger 66.396 ms (27.28%)
ddtrace.settings._core 65.454 ms (26.89%)
ddtrace.settings 65.422 ms (26.88%)
ddtrace.settings._config 64.562 ms (26.52%)
ddtrace.settings.endpoint_config 24.866 ms (10.22%)
ddtrace.internal.utils.http 23.941 ms (9.84%)
http.client 17.565 ms (7.22%)
email.parser 9.739 ms (4.00%)
email.feedparser 9.435 ms (3.88%)
email._policybase 8.112 ms (3.33%)
email.utils 6.137 ms (2.52%)
email._parseaddr 3.045 ms (1.25%)
calendar 2.674 ms (1.10%)
locale 1.612 ms (0.66%)
_locale 0.174 ms (0.07%)
socket 2.526 ms (1.04%)
_socket 0.463 ms (0.19%)
array 0.416 ms (0.17%)
email.header 1.574 ms (0.65%)
email.quoprimime 0.341 ms (0.14%)
email.charset 0.297 ms (0.12%)
email.base64mime 0.227 ms (0.09%)
email.errors 0.689 ms (0.28%)
ssl 4.610 ms (1.89%)
_ssl 1.705 ms (0.70%)
email.message 1.224 ms (0.50%)
email._encoded_words 0.385 ms (0.16%)
email.iterators 0.239 ms (0.10%)
http 0.877 ms (0.36%)
ddtrace.internal.http 3.194 ms (1.31%)
ddtrace.internal.runtime 1.614 ms (0.66%)
uuid 0.887 ms (0.36%)
_uuid 0.364 ms (0.15%)
ddtrace.internal.forksafe 0.367 ms (0.15%)
ddtrace.internal.runtime.container 1.228 ms (0.50%)
email.encoders 1.496 ms (0.61%)
base64 0.680 ms (0.28%)
binascii 0.312 ms (0.13%)
quopri 0.266 ms (0.11%)
email 0.250 ms (0.10%)
ddtrace.internal.uds 0.275 ms (0.11%)
ddtrace.internal.utils.retry 0.619 ms (0.25%)
__future__ 0.265 ms (0.11%)
ddtrace.settings._telemetry 16.288 ms (6.69%)
ddtrace.internal.telemetry 15.949 ms (6.55%)
ddtrace.internal.telemetry.writer 15.463 ms (6.35%)
ddtrace.internal.utils.version 4.216 ms (1.73%)
ddtrace.vendor.packaging.version 3.453 ms (1.42%)
ddtrace.vendor.packaging 0.569 ms (0.23%)
ddtrace.vendor 0.265 ms (0.11%)
ddtrace.vendor.packaging._structures 0.290 ms (0.12%)
ddtrace.version 0.247 ms (0.10%)
ddtrace._version 0.233 ms (0.10%)
ddtrace.internal.telemetry.data 3.853 ms (1.58%)
ddtrace.internal.packages 2.750 ms (1.13%)
_sysconfigdata__linux_x86_64-linux-gnu 0.596 ms (0.24%)
ddtrace.settings.third_party 0.383 ms (0.16%)
sysconfig 0.511 ms (0.21%)
ddtrace.internal.hostname 0.246 ms (0.10%)
ddtrace.internal.periodic 1.967 ms (0.81%)
ddtrace.internal._threads 1.141 ms (0.47%)
ddtrace.internal.service 0.444 ms (0.18%)
ddtrace.internal.atexit 1.204 ms (0.49%)
signal 0.681 ms (0.28%)
ddtrace.internal.utils.signals 0.248 ms (0.10%)
ddtrace.internal.encoding 0.934 ms (0.38%)
ddtrace.internal._encoding 0.578 ms (0.24%)
ddtrace.internal.telemetry.constants 0.556 ms (0.23%)
ddtrace.internal.agent 0.453 ms (0.19%)
ddtrace.internal.telemetry.metrics 0.434 ms (0.18%)
ddtrace.internal.telemetry.metrics_namespaces 0.342 ms (0.14%)
ddtrace.internal.telemetry.logging 0.327 ms (0.13%)
ddtrace.internal.telemetry.modules 0.261 ms (0.11%)
ddtrace.internal.gitmetadata 14.562 ms (5.98%)
ddtrace.ext.ci 10.871 ms (4.47%)
ddtrace.ext.git 9.125 ms (3.75%)
shutil 3.051 ms (1.25%)
bz2 1.023 ms (0.42%)
_bz2 0.366 ms (0.15%)
_compression 0.319 ms (0.13%)
lzma 0.749 ms (0.31%)
_lzma 0.411 ms (0.17%)
zlib 0.414 ms (0.17%)
subprocess 2.376 ms (0.98%)
selectors 0.618 ms (0.25%)
fcntl 0.292 ms (0.12%)
select 0.283 ms (0.12%)
_posixsubprocess 0.267 ms (0.11%)
msvcrt 0.110 ms (0.05%)
random 1.529 ms (0.63%)
bisect 0.517 ms (0.21%)
_bisect 0.280 ms (0.11%)
_sha2 0.277 ms (0.11%)
_random 0.268 ms (0.11%)
ddtrace.internal.utils.time 0.920 ms (0.38%)
datetime 0.586 ms (0.24%)
_datetime 0.360 ms (0.15%)
tempfile 0.573 ms (0.24%)
platform 0.830 ms (0.34%)
_wmi 0.115 ms (0.05%)
ddtrace.ext 0.293 ms (0.12%)
ddtrace.settings._core 3.338 ms (1.37%)
envier 1.646 ms (0.68%)
envier.env 1.374 ms (0.56%)
ddtrace.internal.native 0.860 ms (0.35%)
ddtrace.internal.native._native 0.548 ms (0.23%)
ddtrace.settings._otel_remapper 0.377 ms (0.15%)
ddtrace._trace.pin 3.950 ms (1.62%)
wrapt 3.238 ms (1.33%)
wrapt.__wrapt__ 1.271 ms (0.52%)
wrapt.wrappers 0.558 ms (0.23%)
wrapt._wrappers 0.412 ms (0.17%)
wrapt.decorators 0.686 ms (0.28%)
wrapt.arguments 0.251 ms (0.10%)
wrapt.importer 0.329 ms (0.14%)
wrapt.weakrefs 0.326 ms (0.13%)
wrapt.patches 0.308 ms (0.13%)
ddtrace._trace 0.241 ms (0.10%)
ddtrace.internal.schema 2.247 ms (0.92%)
ddtrace.internal.schema.span_attribute_schema 1.936 ms (0.80%)
ddtrace.settings._inferred_base_service 0.416 ms (0.17%)
ddtrace.settings.integration 0.562 ms (0.23%)
ddtrace.internal.utils.attrdict 0.267 ms (0.11%)
ddtrace.internal.utils.cache 0.341 ms (0.14%)
ddtrace.settings.http 0.308 ms (0.13%)
ddtrace.internal.serverless 0.275 ms (0.11%)
ddtrace._hooks 0.316 ms (0.13%)
ddtrace.settings.exceptions 0.264 ms (0.11%)
ddtrace.internal.utils.formats 0.942 ms (0.39%)
ddtrace.internal.constants 0.563 ms (0.23%)
ddtrace.constants 0.253 ms (0.10%)
ddtrace.internal.compat 0.379 ms (0.16%)
ddtrace.internal.module 42.036 ms (17.27%)
ddtrace.internal.wrapping.context 18.618 ms (7.65%)
ddtrace.internal.wrapping 17.589 ms (7.23%)
bytecode 14.626 ms (6.01%)
bytecode.bytecode 11.521 ms (4.73%)
bytecode.flags 10.981 ms (4.51%)
bytecode.instr 9.902 ms (4.07%)
dataclasses 5.435 ms (2.23%)
inspect 4.610 ms (1.89%)
ast 2.293 ms (0.94%)
_ast 1.202 ms (0.49%)
copy 0.197 ms (0.08%)
dis 0.856 ms (0.35%)
bytecode.utils 0.151 ms (0.06%)
opcode 0.573 ms (0.24%)
_opcode 0.157 ms (0.06%)
bytecode.cfg 2.619 ms (1.08%)
bytecode.concrete 1.299 ms (0.53%)
struct 0.342 ms (0.14%)
_struct 0.205 ms (0.08%)
bytecode.version 0.237 ms (0.10%)
ddtrace.internal.wrapping.asyncs 1.485 ms (0.61%)
ddtrace.internal.wrapping.generators 0.734 ms (0.30%)
ddtrace.internal.assembly 0.376 ms (0.15%)
contextvars 0.277 ms (0.11%)
_contextvars 0.147 ms (0.06%)
pathlib 8.834 ms (3.63%)
fnmatch 4.225 ms (1.74%)
re 3.981 ms (1.64%)
enum 2.001 ms (0.82%)
functools 0.689 ms (0.28%)
_functools 0.062 ms (0.03%)
re._compiler 1.314 ms (0.54%)
re._parser 0.782 ms (0.32%)
re._constants 0.354 ms (0.15%)
re._casefix 0.128 ms (0.05%)
_sre 0.070 ms (0.03%)
copyreg 0.179 ms (0.07%)
urllib.parse 3.299 ms (1.36%)
ipaddress 1.837 ms (0.75%)
math 0.284 ms (0.12%)
urllib 0.129 ms (0.05%)
ntpath 0.483 ms (0.20%)
nt 0.335 ms (0.14%)
_winapi 0.068 ms (0.03%)
errno 0.056 ms (0.02%)
ddtrace.internal.logger 6.319 ms (2.60%)
logging 6.016 ms (2.47%)
traceback 2.777 ms (1.14%)
linecache 1.297 ms (0.53%)
tokenize 1.144 ms (0.47%)
token 0.176 ms (0.07%)
_tokenize 0.038 ms (0.02%)
textwrap 0.932 ms (0.38%)
string 0.675 ms (0.28%)
_string 0.037 ms (0.02%)
threading 0.594 ms (0.24%)
atexit 0.041 ms (0.02%)
typing 3.425 ms (1.41%)
contextlib 0.646 ms (0.27%)
collections.abc 0.173 ms (0.07%)
_typing 0.041 ms (0.02%)
collections 1.750 ms (0.72%)
operator 0.347 ms (0.14%)
_operator 0.069 ms (0.03%)
reprlib 0.187 ms (0.08%)
keyword 0.137 ms (0.06%)
itertools 0.113 ms (0.05%)
_collections 0.065 ms (0.03%)
weakref 0.728 ms (0.30%)
_weakrefset 0.216 ms (0.09%)
importlib.util 0.563 ms (0.23%)
types 0.264 ms (0.11%)
importlib._abc 0.195 ms (0.08%)
ddtrace.internal.utils 0.340 ms (0.14%)
importlib._bootstrap 0.193 ms (0.08%)
importlib 0.170 ms (0.07%)
ddtrace.internal 0.184 ms (0.08%)
importlib.machinery 0.052 ms (0.02%)
warnings 0.303 ms (0.12%)
ddtrace.bootstrap.sitecustomize 21.007 ms (8.63%)
ddtrace.bootstrap.preload 11.207 ms (4.60%)
ddtrace.internal.products 9.678 ms (3.98%)
ddtrace.internal.symbol_db.remoteconfig 8.417 ms (3.46%)
multiprocessing 3.672 ms (1.51%)
multiprocessing.context 3.348 ms (1.38%)
multiprocessing.reduction 2.192 ms (0.90%)
pickle 1.775 ms (0.73%)
_compat_pickle 0.435 ms (0.18%)
_pickle 0.389 ms (0.16%)
multiprocessing.process 0.445 ms (0.18%)
ddtrace.internal.remoteconfig._connectors 2.939 ms (1.21%)
ctypes 2.616 ms (1.07%)
_ctypes 0.540 ms (0.22%)
ctypes._endian 0.433 ms (0.18%)
multiprocessing.sharedctypes 1.806 ms (0.74%)
multiprocessing.heap 1.141 ms (0.47%)
mmap 0.391 ms (0.16%)
multiprocessing.util 0.391 ms (0.16%)
ddtrace.internal.remoteconfig.client 1.262 ms (0.52%)
ddtrace.internal.remoteconfig._pubsub 1.262 ms (0.52%)
ddtrace.internal.remoteconfig._subscribers 0.539 ms (0.22%)
ddtrace.internal.remoteconfig.utils 0.232 ms (0.10%)
ddtrace.internal.remoteconfig._publishers 0.446 ms (0.18%)
ddtrace.settings.profiling 1.134 ms (0.47%)
ddtrace.internal.datadog.profiling.ddup 0.568 ms (0.23%)
ddtrace.internal.datadog.profiling.ddup._ddup 0.568 ms (0.23%)
ddtrace.internal.datadog.profiling._types 0.294 ms (0.12%)
ddtrace.internal.datadog.profiling.util 0.274 ms (0.11%)
ddtrace.internal.datadog.profiling 0.566 ms (0.23%)
ddtrace.internal.datadog 0.259 ms (0.11%)
ddtrace.internal.tracemethods 0.395 ms (0.16%)
ddtrace._trace.trace_handlers 9.800 ms (4.03%)
ddtrace._trace.utils_botocore.span_tags 7.175 ms (2.95%)
ddtrace._trace.utils_botocore.aws_payload_tagging 6.603 ms (2.71%)
ddtrace.vendor.jsonpath_ng 4.671 ms (1.92%)
ddtrace.vendor.jsonpath_ng.jsonpath 2.328 ms (0.96%)
ddtrace.vendor.jsonpath_ng.lexer 1.655 ms (0.68%)
ddtrace.vendor.ply.lex 0.940 ms (0.39%)
ddtrace.vendor.ply 0.250 ms (0.10%)
ddtrace.vendor.jsonpath_ng.exceptions 0.305 ms (0.13%)
ddtrace.vendor.jsonpath_ng.parser 2.068 ms (0.85%)
ddtrace.vendor.ply.yacc 1.691 ms (0.69%)
decimal 1.620 ms (0.67%)
_decimal 1.389 ms (0.57%)
numbers 0.581 ms (0.24%)
ddtrace.ext.aws 0.270 ms (0.11%)
ddtrace._trace.utils_botocore.span_pointers 2.625 ms (1.08%)
ddtrace._trace.utils_botocore.span_pointers.dynamodb 1.378 ms (0.57%)
ddtrace._trace.utils_botocore.span_pointers.telemetry 0.266 ms (0.11%)
ddtrace._trace.utils_botocore.span_pointers.s3 0.634 ms (0.26%)
ddtrace._trace.utils_botocore 0.249 ms (0.10%)

The following import paths have disappeared:

ddtrace.auto 120.041 ms (49.31%)
ddtrace 110.045 ms (45.21%)
ddtrace._logger 92.373 ms (37.95%)
ddtrace.internal.telemetry 82.329 ms (33.82%)
ddtrace.internal.telemetry.writer 80.588 ms (33.11%)
ddtrace.internal.utils.version 28.073 ms (11.53%)
ddtrace.vendor.packaging.version 27.444 ms (11.27%)
ddtrace.vendor.packaging 25.136 ms (10.33%)
ddtrace.vendor 11.586 ms (4.76%)
ddtrace.internal.module 11.438 ms (4.70%)
ddtrace.internal.wrapping.context 10.666 ms (4.38%)
ddtrace.internal.wrapping 9.723 ms (3.99%)
bytecode 6.820 ms (2.80%)
bytecode.bytecode 4.077 ms (1.67%)
bytecode.flags 3.465 ms (1.42%)
bytecode.instr 2.971 ms (1.22%)
bytecode.utils 0.124 ms (0.05%)
bytecode.cfg 2.248 ms (0.92%)
bytecode.concrete 0.922 ms (0.38%)
bytecode.version 0.239 ms (0.10%)
ddtrace.internal.wrapping.asyncs 1.455 ms (0.60%)
ddtrace.internal.wrapping.generators 0.713 ms (0.29%)
ddtrace.internal.assembly 0.374 ms (0.15%)
contextvars 0.273 ms (0.11%)
_contextvars 0.149 ms (0.06%)
ddtrace.vendor.packaging._structures 0.309 ms (0.13%)
ddtrace.version 0.240 ms (0.10%)
ddtrace._version 0.232 ms (0.10%)
http.client 21.168 ms (8.70%)
email.parser 13.696 ms (5.63%)
email.feedparser 13.298 ms (5.46%)
email._policybase 12.200 ms (5.01%)
email.utils 9.534 ms (3.92%)
socket 3.025 ms (1.24%)
selectors 0.701 ms (0.29%)
select 0.180 ms (0.07%)
_socket 0.511 ms (0.21%)
array 0.276 ms (0.11%)
errno 0.060 ms (0.02%)
urllib.parse 2.475 ms (1.02%)
ipaddress 1.282 ms (0.53%)
urllib 0.129 ms (0.05%)
email._parseaddr 2.008 ms (0.83%)
calendar 1.766 ms (0.73%)
locale 0.829 ms (0.34%)
_locale 0.080 ms (0.03%)
random 1.184 ms (0.49%)
bisect 0.287 ms (0.12%)
_bisect 0.148 ms (0.06%)
math 0.200 ms (0.08%)
_sha2 0.163 ms (0.07%)
_random 0.153 ms (0.06%)
datetime 0.372 ms (0.15%)
_datetime 0.234 ms (0.10%)
email.header 2.376 ms (0.98%)
email.base64mime 0.686 ms (0.28%)
base64 0.561 ms (0.23%)
struct 0.320 ms (0.13%)
_struct 0.194 ms (0.08%)
email.charset 0.562 ms (0.23%)
email.encoders 0.290 ms (0.12%)
quopri 0.161 ms (0.07%)
binascii 0.286 ms (0.12%)
email.quoprimime 0.240 ms (0.10%)
email.errors 0.574 ms (0.24%)
email 0.141 ms (0.06%)
ssl 4.230 ms (1.74%)
_ssl 1.560 ms (0.64%)
email.message 0.896 ms (0.37%)
email._encoded_words 0.269 ms (0.11%)
email.iterators 0.133 ms (0.05%)
http 0.769 ms (0.32%)
ddtrace.internal.utils.http 15.060 ms (6.19%)
dataclasses 7.057 ms (2.90%)
inspect 6.229 ms (2.56%)
ast 2.297 ms (0.94%)
_ast 1.189 ms (0.49%)
dis 1.463 ms (0.60%)
opcode 0.583 ms (0.24%)
_opcode 0.154 ms (0.06%)
importlib.machinery 0.228 ms (0.09%)
importlib 0.165 ms (0.07%)
copy 0.202 ms (0.08%)
ddtrace.internal.http 5.443 ms (2.24%)
ddtrace.internal.runtime 4.229 ms (1.74%)
ddtrace.internal.forksafe 2.671 ms (1.10%)
wrapt 2.423 ms (1.00%)
wrapt.__wrapt__ 0.874 ms (0.36%)
wrapt.wrappers 0.414 ms (0.17%)
wrapt._wrappers 0.268 ms (0.11%)
wrapt.importer 0.520 ms (0.21%)
importlib.util 0.312 ms (0.13%)
importlib._abc 0.190 ms (0.08%)
wrapt.decorators 0.498 ms (0.20%)
wrapt.arguments 0.124 ms (0.05%)
wrapt.patches 0.181 ms (0.07%)
wrapt.weakrefs 0.149 ms (0.06%)
uuid 1.330 ms (0.55%)
platform 0.582 ms (0.24%)
_wmi 0.076 ms (0.03%)
_uuid 0.254 ms (0.10%)
ddtrace.internal.runtime.container 1.006 ms (0.41%)
ddtrace.internal.utils 0.354 ms (0.15%)
ddtrace.internal.utils.cache 0.216 ms (0.09%)
ddtrace.internal.constants 0.182 ms (0.07%)
ddtrace.internal.uds 0.154 ms (0.06%)
ddtrace.constants 0.148 ms (0.06%)
ddtrace.settings._agent 3.811 ms (1.57%)
ddtrace.settings._core 2.300 ms (0.94%)
envier 1.320 ms (0.54%)
envier.env 1.167 ms (0.48%)
ddtrace.internal.native 0.592 ms (0.24%)
ddtrace.internal.native._native 0.402 ms (0.17%)
ddtrace.settings 0.983 ms (0.40%)
ddtrace.settings.integration 0.300 ms (0.12%)
ddtrace.internal.utils.attrdict 0.123 ms (0.05%)
ddtrace.settings.exceptions 0.184 ms (0.08%)
ddtrace._hooks 0.182 ms (0.07%)
ddtrace.settings.http 0.163 ms (0.07%)
ddtrace.internal.telemetry.data 3.728 ms (1.53%)
ddtrace.internal.packages 2.652 ms (1.09%)
_sysconfigdata__linux_x86_64-linux-gnu 0.575 ms (0.24%)
ddtrace.settings.third_party 0.326 ms (0.13%)
sysconfig 0.499 ms (0.20%)
ddtrace.internal.hostname 0.249 ms (0.10%)
ddtrace.settings._telemetry 2.377 ms (0.98%)
ddtrace.settings._inferred_base_service 1.710 ms (0.70%)
pathlib 1.257 ms (0.52%)
ntpath 0.475 ms (0.20%)
nt 0.322 ms (0.13%)
_winapi 0.067 ms (0.03%)
fnmatch 0.153 ms (0.06%)
ddtrace.internal.periodic 1.571 ms (0.65%)
ddtrace.internal._threads 0.989 ms (0.41%)
ddtrace.internal.service 0.313 ms (0.13%)
ddtrace.internal.encoding 1.531 ms (0.63%)
ddtrace.internal._encoding 0.350 ms (0.14%)
ddtrace.internal.compat 0.299 ms (0.12%)
ddtrace.internal.atexit 0.995 ms (0.41%)
signal 0.558 ms (0.23%)
__future__ 0.151 ms (0.06%)
ddtrace.internal.utils.signals 0.118 ms (0.05%)
ddtrace.internal.telemetry.metrics 0.428 ms (0.18%)
ddtrace.internal.telemetry.logging 0.408 ms (0.17%)
ddtrace.internal.telemetry.metrics_namespaces 0.339 ms (0.14%)
ddtrace.internal.utils.time 0.259 ms (0.11%)
ddtrace.internal.telemetry.modules 0.253 ms (0.10%)
ddtrace.internal.telemetry.constants 0.502 ms (0.21%)
ddtrace.settings._otel_remapper 0.378 ms (0.16%)
ddtrace.internal.logger 0.300 ms (0.12%)
logging 7.400 ms (3.04%)
traceback 4.124 ms (1.69%)
contextlib 1.237 ms (0.51%)
linecache 1.188 ms (0.49%)
tokenize 1.039 ms (0.43%)
token 0.175 ms (0.07%)
_tokenize 0.037 ms (0.02%)
textwrap 0.907 ms (0.37%)
collections.abc 0.162 ms (0.07%)
string 0.663 ms (0.27%)
_string 0.036 ms (0.01%)
weakref 0.420 ms (0.17%)
warnings 0.299 ms (0.12%)
atexit 0.045 ms (0.02%)
typing 2.645 ms (1.09%)
_typing 0.041 ms (0.02%)
ddtrace.settings._config 10.259 ms (4.21%)
ddtrace.internal.gitmetadata 6.968 ms (2.86%)
ddtrace.ext.ci 6.546 ms (2.69%)
ddtrace.ext.git 5.665 ms (2.33%)
shutil 3.007 ms (1.24%)
bz2 1.132 ms (0.47%)
_compression 0.402 ms (0.16%)
_bz2 0.389 ms (0.16%)
lzma 0.768 ms (0.32%)
_lzma 0.428 ms (0.18%)
zlib 0.345 ms (0.14%)
subprocess 1.502 ms (0.62%)
fcntl 0.305 ms (0.13%)
_posixsubprocess 0.269 ms (0.11%)
msvcrt 0.110 ms (0.05%)
tempfile 0.499 ms (0.21%)
ddtrace.ext 0.296 ms (0.12%)
ddtrace.internal.schema 0.799 ms (0.33%)
ddtrace.internal.schema.span_attribute_schema 0.490 ms (0.20%)
ddtrace.settings.endpoint_config 0.638 ms (0.26%)
ddtrace.internal.utils.retry 0.360 ms (0.15%)
ddtrace._trace.pin 0.634 ms (0.26%)
ddtrace._trace 0.237 ms (0.10%)
ddtrace.internal.serverless 0.278 ms (0.11%)
ddtrace.internal._unpatched 7.130 ms (2.93%)
json 5.986 ms (2.46%)
json.decoder 5.986 ms (2.46%)
re 5.986 ms (2.46%)
enum 4.053 ms (1.66%)
functools 2.015 ms (0.83%)
collections 1.350 ms (0.55%)
reprlib 0.187 ms (0.08%)
itertools 0.180 ms (0.07%)
keyword 0.134 ms (0.06%)
_collections 0.068 ms (0.03%)
_functools 0.052 ms (0.02%)
operator 0.440 ms (0.18%)
_operator 0.076 ms (0.03%)
types 0.267 ms (0.11%)
re._compiler 1.265 ms (0.52%)
re._parser 0.627 ms (0.26%)
re._constants 0.266 ms (0.11%)
re._casefix 0.209 ms (0.09%)
_sre 0.067 ms (0.03%)
copyreg 0.174 ms (0.07%)
threading 0.958 ms (0.39%)
_weakrefset 0.305 ms (0.13%)
ddtrace.internal 0.186 ms (0.08%)
ddtrace.trace 0.283 ms (0.12%)
ddtrace._trace.filters 0.283 ms (0.12%)
ddtrace._trace.processor 0.283 ms (0.12%)
ddtrace.internal.writer 0.283 ms (0.12%)
ddtrace.internal.writer.writer 0.283 ms (0.12%)
ddtrace.internal.agent 0.283 ms (0.12%)
ddtrace.bootstrap.sitecustomize 9.996 ms (4.11%)
ddtrace.bootstrap.preload 9.996 ms (4.11%)
ddtrace.internal.products 8.770 ms (3.60%)
multiprocessing 3.657 ms (1.50%)
multiprocessing.context 3.329 ms (1.37%)
multiprocessing.reduction 2.191 ms (0.90%)
pickle 1.775 ms (0.73%)
_compat_pickle 0.435 ms (0.18%)
_pickle 0.388 ms (0.16%)
multiprocessing.process 0.434 ms (0.18%)
ddtrace.internal.remoteconfig._connectors 2.316 ms (0.95%)
ctypes 1.956 ms (0.80%)
_ctypes 0.604 ms (0.25%)
ctypes._endian 0.430 ms (0.18%)
multiprocessing.sharedctypes 1.833 ms (0.75%)
multiprocessing.heap 1.151 ms (0.47%)
multiprocessing.util 0.399 ms (0.16%)
mmap 0.392 ms (0.16%)
ddtrace.internal.remoteconfig._pubsub 0.637 ms (0.26%)
ddtrace.internal.remoteconfig._subscribers 0.334 ms (0.14%)
ddtrace.internal.remoteconfig._publishers 0.327 ms (0.13%)
ddtrace.settings.crashtracker 1.226 ms (0.50%)
ddtrace.internal.datadog.profiling.crashtracker 0.670 ms (0.28%)
ddtrace.internal.datadog.profiling.crashtracker._crashtracker 0.670 ms (0.28%)
ddtrace.internal.datadog.profiling._types 0.393 ms (0.16%)
ddtrace.internal.datadog.profiling.util 0.277 ms (0.11%)
ddtrace.internal.datadog.profiling 0.556 ms (0.23%)
ddtrace.internal.datadog 0.255 ms (0.10%)

The following import paths have grown:

ddtrace.auto 11.064 ms (4.55%)
ddtrace 8.207 ms (3.37%)
ddtrace.internal._unpatched 7.223 ms (2.97%)
json 7.103 ms (2.92%)
json.decoder 6.882 ms (2.83%)
json.scanner 6.793 ms (2.79%)
_json 6.744 ms (2.77%)
json.encoder 0.110 ms (0.05%)
gc 0.077 ms (0.03%)
ddtrace.trace 0.486 ms (0.20%)
ddtrace._trace.tracer 0.212 ms (0.09%)
ddtrace.internal.debug 0.131 ms (0.05%)
ddtrace.internal.dogstatsd 0.081 ms (0.03%)
ddtrace.vendor.dogstatsd 0.081 ms (0.03%)
ddtrace.vendor.dogstatsd.base 0.081 ms (0.03%)
ddtrace.vendor.dogstatsd.container 0.081 ms (0.03%)
ddtrace._trace.filters 0.193 ms (0.08%)
ddtrace._trace.processor 0.193 ms (0.08%)
ddtrace._trace.sampler 0.193 ms (0.08%)
ddtrace._trace.span 0.193 ms (0.08%)
ddtrace._trace._span_pointer 0.097 ms (0.04%)
ddtrace._trace.telemetry 0.097 ms (0.04%)
ddtrace._trace.context 0.081 ms (0.03%)
ddtrace._trace._span_link 0.081 ms (0.03%)
ddtrace._logger 0.237 ms (0.10%)
ddtrace.internal.utils.formats 0.137 ms (0.06%)
ddtrace._monkey 0.145 ms (0.06%)
ddtrace.settings.asm 0.080 ms (0.03%)
ddtrace.appsec 0.065 ms (0.03%)
ddtrace.internal.core 0.065 ms (0.03%)
ddtrace.vendor.debtcollector 0.065 ms (0.03%)
ddtrace.vendor.debtcollector.renames 0.065 ms (0.03%)
ddtrace.internal._file_queue 0.116 ms (0.05%)
secrets 0.116 ms (0.05%)
ddtrace.bootstrap.sitecustomize 2.857 ms (1.17%)
ddtrace.bootstrap.preload 2.569 ms (1.06%)
ddtrace.settings.profiling 1.097 ms (0.45%)
ddtrace.vendor.psutil 0.678 ms (0.28%)
ddtrace.internal.datadog.profiling.ddup 0.418 ms (0.17%)
ddtrace.internal.datadog.profiling.ddup._ddup 0.418 ms (0.17%)
ddtrace.internal.products 0.539 ms (0.22%)
importlib.metadata 0.305 ms (0.13%)
zipfile 0.082 ms (0.03%)
importlib.abc 0.073 ms (0.03%)
importlib.resources 0.073 ms (0.03%)
importlib.resources._common 0.073 ms (0.03%)
importlib.resources._adapters 0.073 ms (0.03%)
importlib.metadata._adapters 0.064 ms (0.03%)
ddtrace.internal.symbol_db.remoteconfig 0.159 ms (0.07%)
ddtrace.internal.symbol_db.symbols 0.082 ms (0.03%)
ddtrace.internal.safety 0.082 ms (0.03%)
ddtrace.internal.uwsgi 0.075 ms (0.03%)
ddtrace.internal.flare.flare 0.087 ms (0.04%)
logging.handlers 0.087 ms (0.04%)
ddtrace._trace.trace_handlers 0.185 ms (0.08%)
ddtrace.contrib.internal.botocore.constants 0.086 ms (0.04%)
ddtrace.contrib.internal.botocore 0.086 ms (0.04%)
ddtrace._trace.utils 0.060 ms (0.02%)
ddtrace._trace._inferred_proxy 0.040 ms (0.02%)
ddtrace.appsec._common_module_patches 0.103 ms (0.04%)
ddtrace.appsec._asm_request_context 0.103 ms (0.04%)

The following import paths have shrunk:

ddtrace.auto 8.173 ms (3.36%)
ddtrace.bootstrap.sitecustomize 6.327 ms (2.60%)
ddtrace.bootstrap.preload 6.052 ms (2.49%)
ddtrace.internal.products 4.730 ms (1.94%)
importlib.metadata 0.930 ms (0.38%)
importlib.abc 0.688 ms (0.28%)
importlib.resources 0.688 ms (0.28%)
importlib.resources._legacy 0.688 ms (0.28%)
csv 0.107 ms (0.04%)
importlib.metadata._itertools 0.068 ms (0.03%)
zipfile 0.068 ms (0.03%)
zipfile._path 0.068 ms (0.03%)
ddtrace.internal.symbol_db.remoteconfig 0.159 ms (0.07%)
ddtrace.internal.symbol_db.symbols 0.159 ms (0.07%)
ddtrace.debugging._config 0.069 ms (0.03%)
ddtrace.settings.exception_replay 0.069 ms (0.03%)
ddtrace.settings.code_origin 0.027 ms (0.01%)
ddtrace.settings.profiling 0.690 ms (0.28%)
ddtrace.vendor.psutil 0.690 ms (0.28%)
ddtrace.vendor.psutil._common 0.690 ms (0.28%)
ddtrace.settings.crashtracker 0.460 ms (0.19%)
ddtrace.internal.datadog.profiling.crashtracker 0.460 ms (0.19%)
ddtrace.internal.datadog.profiling.crashtracker._crashtracker 0.428 ms (0.18%)
ddtrace.appsec._remoteconfiguration 0.106 ms (0.04%)
ddtrace.appsec._capabilities 0.106 ms (0.04%)
ddtrace.internal.flare.flare 0.066 ms (0.03%)
ddtrace.internal.flare 0.066 ms (0.03%)
ddtrace._trace.trace_handlers 0.192 ms (0.08%)
ddtrace._trace._inferred_proxy 0.077 ms (0.03%)
ddtrace.propagation.http 0.077 ms (0.03%)
ddtrace.appsec._common_module_patches 0.083 ms (0.03%)
ddtrace.appsec._asm_request_context 0.083 ms (0.03%)
ddtrace.appsec._utils 0.083 ms (0.03%)
ddtrace 1.846 ms (0.76%)
ddtrace.trace 0.560 ms (0.23%)
ddtrace._trace.filters 0.352 ms (0.14%)
ddtrace._trace.processor 0.352 ms (0.14%)
ddtrace._trace.sampler 0.210 ms (0.09%)
ddtrace._trace.span 0.097 ms (0.04%)
ddtrace.internal.sampling 0.097 ms (0.04%)
ddtrace._trace.sampling_rule 0.097 ms (0.04%)
ddtrace.internal.glob_matching 0.097 ms (0.04%)
ddtrace.internal.writer 0.143 ms (0.06%)
ddtrace.internal.writer.writer 0.143 ms (0.06%)
ddtrace._trace.tracer 0.208 ms (0.09%)
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%)
heapq 0.120 ms (0.05%)
ddtrace.internal.processor.endpoint_call_counter 0.088 ms (0.04%)
ddtrace._monkey 0.088 ms (0.04%)
ddtrace.appsec 0.088 ms (0.04%)
ddtrace.internal.core 0.088 ms (0.04%)

@pr-commenter
Copy link

pr-commenter bot commented Mar 26, 2025

Benchmarks

Benchmark execution time: 2025-04-01 09:23:44

Comparing candidate commit 79dc465 in PR branch backport-12862-to-3.3 with baseline commit 4bf3c4d in branch main.

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

@vitor-de-araujo vitor-de-araujo enabled auto-merge (squash) March 28, 2025 15:01
auto-merge was automatically disabled March 28, 2025 15:26

Pull request was closed

@vitor-de-araujo vitor-de-araujo enabled auto-merge (squash) March 28, 2025 15:28
@vitor-de-araujo vitor-de-araujo changed the title fix(ci_visibility): count failed/skipped tests in JUnit XML when retries are enabled [backport 3.3] fix(ci_visibility): count failed/skipped tests in JUnit XML when retries are enabled [backport 3.3] Mar 31, 2025
@vitor-de-araujo vitor-de-araujo changed the title fix(ci_visibility): count failed/skipped tests in JUnit XML when retries are enabled [backport 3.3] fix(ci_visibility): count failed/skipped tests in JUnit XML when retries are enabled [backport 3.3] Mar 31, 2025
@vitor-de-araujo vitor-de-araujo merged commit a06249b into 3.3 Apr 1, 2025
288 of 289 checks passed
@vitor-de-araujo vitor-de-araujo deleted the backport-12862-to-3.3 branch April 1, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants