DataDog / dd-trace-java

Datadog APM client for Java
https://docs.datadoghq.com/tracing/languages/java
Apache License 2.0
588 stars 290 forks source link

Refactor versions of freemarker to a common folder #7579

Closed Mariovido closed 2 months ago

Mariovido commented 2 months ago

What Does This Do

Refactor the instrumentations of freemarker to a common folder

Motivation

Additional Notes

Contributor Checklist

Jira ticket: APPSEC-11285

pr-commenter[bot] commented 2 months ago

Benchmarks

Startup

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-09-09T13:32:28 2024-09-09T13:39:15
git_branch master mario.vidal/xss_freemarker_refactoring
git_commit_date 1725887583 1725888015
git_commit_sha 3fd417447a fc1b87ce05
release_version 1.40.0-SNAPSHOT~3fd417447a 1.40.0-SNAPSHOT~fc1b87ce05
start_time 2024-09-09T13:32:14 2024-09-09T13:39:02
See matching parameters | |Baseline |Candidate | |---------------------|----------------------------------------------|----------------------------------------------| |application |insecure-bank |insecure-bank | |ci_job_date |1725889499 |1725889499 | |ci_job_id |631924213 |631924213 | |ci_pipeline_id|43853750 |43853750 | |cpu_model |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz| |variant |iast |iast |

Summary

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

Request duration reports for petclinic ```mermaid gantt title petclinic - request duration [CI 0.99] : candidate=1.40.0-SNAPSHOT~fc1b87ce05, baseline=1.40.0-SNAPSHOT~3fd417447a dateFormat X axisFormat %s section baseline no_agent (1.329 ms) : 1310, 1348 . : milestone, 1329, appsec (1.71 ms) : 1686, 1735 . : milestone, 1710, appsec_no_iast (1.735 ms) : 1712, 1759 . : milestone, 1735, iast (1.463 ms) : 1440, 1485 . : milestone, 1463, profiling (1.488 ms) : 1465, 1510 . : milestone, 1488, tracing (1.452 ms) : 1427, 1476 . : milestone, 1452, section candidate no_agent (1.347 ms) : 1328, 1366 . : milestone, 1347, appsec (1.727 ms) : 1703, 1750 . : milestone, 1727, appsec_no_iast (1.723 ms) : 1700, 1747 . : milestone, 1723, iast (1.471 ms) : 1448, 1493 . : milestone, 1471, profiling (1.48 ms) : 1458, 1503 . : milestone, 1480, tracing (1.466 ms) : 1441, 1491 . : milestone, 1466, ``` * **baseline** results |Variant|Request duration [CI 0.99]|Δ no_agent| |---|---|---| |no_agent|1.329 ms [1.31 ms, 1.348 ms]|-| |appsec|1.71 ms [1.686 ms, 1.735 ms]|380.904 µs (28.7%)| |appsec_no_iast|1.735 ms [1.712 ms, 1.759 ms]|406.113 µs (30.6%)| |iast|1.463 ms [1.44 ms, 1.485 ms]|133.216 µs (10.0%)| |profiling|1.488 ms [1.465 ms, 1.51 ms]|158.187 µs (11.9%)| |tracing|1.452 ms [1.427 ms, 1.476 ms]|122.204 µs (9.2%)| * **candidate** results |Variant|Request duration [CI 0.99]|Δ no_agent| |---|---|---| |no_agent|1.347 ms [1.328 ms, 1.366 ms]|-| |appsec|1.727 ms [1.703 ms, 1.75 ms]|379.867 µs (28.2%)| |appsec_no_iast|1.723 ms [1.7 ms, 1.747 ms]|376.358 µs (27.9%)| |iast|1.471 ms [1.448 ms, 1.493 ms]|123.761 µs (9.2%)| |profiling|1.48 ms [1.458 ms, 1.503 ms]|133.619 µs (9.9%)| |tracing|1.466 ms [1.441 ms, 1.491 ms]|119.146 µs (8.8%)|
Request duration reports for insecure-bank ```mermaid gantt title insecure-bank - request duration [CI 0.99] : candidate=1.40.0-SNAPSHOT~fc1b87ce05, baseline=1.40.0-SNAPSHOT~3fd417447a dateFormat X axisFormat %s section baseline no_agent (373.04 µs) : 353, 393 . : milestone, 373, iast (481.005 µs) : 459, 503 . : milestone, 481, iast_FULL (548.565 µs) : 527, 570 . : milestone, 549, iast_GLOBAL (503.562 µs) : 482, 525 . : milestone, 504, iast_HARDCODED_SECRET_DISABLED (480.377 µs) : 459, 502 . : milestone, 480, iast_INACTIVE (444.509 µs) : 423, 466 . : milestone, 445, iast_TELEMETRY_OFF (474.61 µs) : 452, 497 . : milestone, 475, tracing (440.401 µs) : 419, 462 . : milestone, 440, section candidate no_agent (364.879 µs) : 344, 385 . : milestone, 365, iast (482.887 µs) : 462, 504 . : milestone, 483, iast_FULL (549.845 µs) : 529, 571 . : milestone, 550, iast_GLOBAL (507.191 µs) : 485, 529 . : milestone, 507, iast_HARDCODED_SECRET_DISABLED (479.179 µs) : 457, 501 . : milestone, 479, iast_INACTIVE (439.012 µs) : 418, 460 . : milestone, 439, iast_TELEMETRY_OFF (470.2 µs) : 448, 493 . : milestone, 470, tracing (441.936 µs) : 421, 463 . : milestone, 442, ``` * **baseline** results |Variant|Request duration [CI 0.99]|Δ no_agent| |---|---|---| |no_agent|373.04 µs [353.298 µs, 392.782 µs]|-| |iast|481.005 µs [459.12 µs, 502.89 µs]|107.965 µs (28.9%)| |iast_FULL|548.565 µs [527.361 µs, 569.768 µs]|175.525 µs (47.1%)| |iast_GLOBAL|503.562 µs [481.828 µs, 525.295 µs]|130.522 µs (35.0%)| |iast_HARDCODED_SECRET_DISABLED|480.377 µs [459.222 µs, 501.533 µs]|107.337 µs (28.8%)| |iast_INACTIVE|444.509 µs [422.896 µs, 466.123 µs]|71.469 µs (19.2%)| |iast_TELEMETRY_OFF|474.61 µs [452.102 µs, 497.117 µs]|101.57 µs (27.2%)| |tracing|440.401 µs [418.842 µs, 461.96 µs]|67.361 µs (18.1%)| * **candidate** results |Variant|Request duration [CI 0.99]|Δ no_agent| |---|---|---| |no_agent|364.879 µs [344.416 µs, 385.343 µs]|-| |iast|482.887 µs [461.637 µs, 504.136 µs]|118.007 µs (32.3%)| |iast_FULL|549.845 µs [528.647 µs, 571.044 µs]|184.966 µs (50.7%)| |iast_GLOBAL|507.191 µs [485.189 µs, 529.193 µs]|142.312 µs (39.0%)| |iast_HARDCODED_SECRET_DISABLED|479.179 µs [457.461 µs, 500.898 µs]|114.3 µs (31.3%)| |iast_INACTIVE|439.012 µs [418.359 µs, 459.665 µs]|74.133 µs (20.3%)| |iast_TELEMETRY_OFF|470.2 µs [447.678 µs, 492.723 µs]|105.321 µs (28.9%)| |tracing|441.936 µs [420.756 µs, 463.116 µs]|77.057 µs (21.1%)|

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mario.vidal/xss_freemarker_refactoring
git_commit_date 1725887583 1725888015
git_commit_sha 3fd417447a fc1b87ce05
release_version 1.40.0-SNAPSHOT~3fd417447a 1.40.0-SNAPSHOT~fc1b87ce05
See matching parameters | |Baseline |Candidate | |---------------------|----------------------------------------------|----------------------------------------------| |application |biojava |biojava | |ci_job_date |1725890027 |1725890027 | |ci_job_id |631924215 |631924215 | |ci_pipeline_id|43853750 |43853750 | |cpu_model |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz| |variant |appsec |appsec |

Summary

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

Execution time for tomcat ```mermaid gantt title tomcat - execution time [CI 0.99] : candidate=1.40.0-SNAPSHOT~fc1b87ce05, baseline=1.40.0-SNAPSHOT~3fd417447a dateFormat X axisFormat %s section baseline no_agent (1.463 ms) : 1452, 1475 . : milestone, 1463, appsec (2.231 ms) : 2196, 2267 . : milestone, 2231, iast (1.974 ms) : 1931, 2017 . : milestone, 1974, iast_GLOBAL (2.025 ms) : 1981, 2069 . : milestone, 2025, profiling (2.343 ms) : 2158, 2528 . : milestone, 2343, tracing (1.838 ms) : 1806, 1871 . : milestone, 1838, section candidate no_agent (1.459 ms) : 1447, 1470 . : milestone, 1459, appsec (2.239 ms) : 2203, 2274 . : milestone, 2239, iast (1.973 ms) : 1931, 2016 . : milestone, 1973, iast_GLOBAL (2.02 ms) : 1976, 2063 . : milestone, 2020, profiling (1.883 ms) : 1847, 1919 . : milestone, 1883, tracing (1.845 ms) : 1812, 1878 . : milestone, 1845, ``` * **baseline** results |Variant|Execution Time [CI 0.99]|Δ no_agent| |---|---|---| |no_agent|1.463 ms [1.452 ms, 1.475 ms]|-| |appsec|2.231 ms [2.196 ms, 2.267 ms]|767.838 µs (52.5%)| |iast|1.974 ms [1.931 ms, 2.017 ms]|510.424 µs (34.9%)| |iast_GLOBAL|2.025 ms [1.981 ms, 2.069 ms]|561.49 µs (38.4%)| |profiling|2.343 ms [2.158 ms, 2.528 ms]|879.629 µs (60.1%)| |tracing|1.838 ms [1.806 ms, 1.871 ms]|374.846 µs (25.6%)| * **candidate** results |Variant|Execution Time [CI 0.99]|Δ no_agent| |---|---|---| |no_agent|1.459 ms [1.447 ms, 1.47 ms]|-| |appsec|2.239 ms [2.203 ms, 2.274 ms]|779.758 µs (53.5%)| |iast|1.973 ms [1.931 ms, 2.016 ms]|514.613 µs (35.3%)| |iast_GLOBAL|2.02 ms [1.976 ms, 2.063 ms]|560.885 µs (38.4%)| |profiling|1.883 ms [1.847 ms, 1.919 ms]|424.675 µs (29.1%)| |tracing|1.845 ms [1.812 ms, 1.878 ms]|386.227 µs (26.5%)|
Execution time for biojava ```mermaid gantt title biojava - execution time [CI 0.99] : candidate=1.40.0-SNAPSHOT~fc1b87ce05, baseline=1.40.0-SNAPSHOT~3fd417447a dateFormat X axisFormat %s section baseline no_agent (15.013 s) : 15013000, 15013000 . : milestone, 15013000, appsec (15.245 s) : 15245000, 15245000 . : milestone, 15245000, iast (18.966 s) : 18966000, 18966000 . : milestone, 18966000, iast_GLOBAL (18.205 s) : 18205000, 18205000 . : milestone, 18205000, profiling (15.51 s) : 15510000, 15510000 . : milestone, 15510000, tracing (15.342 s) : 15342000, 15342000 . : milestone, 15342000, section candidate no_agent (15.073 s) : 15073000, 15073000 . : milestone, 15073000, appsec (15.263 s) : 15263000, 15263000 . : milestone, 15263000, iast (18.696 s) : 18696000, 18696000 . : milestone, 18696000, iast_GLOBAL (17.989 s) : 17989000, 17989000 . : milestone, 17989000, profiling (14.98 s) : 14980000, 14980000 . : milestone, 14980000, tracing (15.199 s) : 15199000, 15199000 . : milestone, 15199000, ``` * **baseline** results |Variant|Execution Time [CI 0.99]|Δ no_agent| |---|---|---| |no_agent|15.013 s [15.013 s, 15.013 s]|-| |appsec|15.245 s [15.245 s, 15.245 s]|232.0 ms (1.5%)| |iast|18.966 s [18.966 s, 18.966 s]|3.953 s (26.3%)| |iast_GLOBAL|18.205 s [18.205 s, 18.205 s]|3.192 s (21.3%)| |profiling|15.51 s [15.51 s, 15.51 s]|497.0 ms (3.3%)| |tracing|15.342 s [15.342 s, 15.342 s]|329.0 ms (2.2%)| * **candidate** results |Variant|Execution Time [CI 0.99]|Δ no_agent| |---|---|---| |no_agent|15.073 s [15.073 s, 15.073 s]|-| |appsec|15.263 s [15.263 s, 15.263 s]|190.0 ms (1.3%)| |iast|18.696 s [18.696 s, 18.696 s]|3.623 s (24.0%)| |iast_GLOBAL|17.989 s [17.989 s, 17.989 s]|2.916 s (19.3%)| |profiling|14.98 s [14.98 s, 14.98 s]|-93.0 ms (-0.6%)| |tracing|15.199 s [15.199 s, 15.199 s]|126.0 ms (0.8%)|