Fix root coverage packages calculation in large repositories#6317
Merged
nikita-tkachenko-datadog merged 1 commit intoDec 5, 2023
Merged
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 43 metrics, 11 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.26.0-SNAPSHOT~68cb650aad, baseline=1.25.0~d1eda60b66
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.045 s) : 0, 1044848
Total [baseline] (9.372 s) : 0, 9371885
Agent [candidate] (1.043 s) : 0, 1042754
Total [candidate] (9.327 s) : 0, 9327240
section appsec
Agent [baseline] (1.14 s) : 0, 1139965
Total [baseline] (9.514 s) : 0, 9514340
Agent [candidate] (1.133 s) : 0, 1132836
Total [candidate] (9.51 s) : 0, 9509518
section iast
Agent [baseline] (1.171 s) : 0, 1170882
Total [baseline] (9.604 s) : 0, 9604159
Agent [candidate] (1.162 s) : 0, 1162049
Total [candidate] (9.615 s) : 0, 9615013
section profiling
Agent [baseline] (1.244 s) : 0, 1244388
Total [baseline] (9.651 s) : 0, 9651464
Agent [candidate] (1.24 s) : 0, 1240003
Total [candidate] (9.689 s) : 0, 9689149
gantt
title petclinic - break down per module: candidate=1.26.0-SNAPSHOT~68cb650aad, baseline=1.25.0~d1eda60b66
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (646.772 ms) : 0, 646772
BytebuddyAgent [candidate] (645.379 ms) : 0, 645379
GlobalTracer [baseline] (307.106 ms) : 0, 307106
GlobalTracer [candidate] (306.502 ms) : 0, 306502
AppSec [baseline] (48.827 ms) : 0, 48827
AppSec [candidate] (48.812 ms) : 0, 48812
Remote Config [baseline] (680.385 µs) : 0, 680
Remote Config [candidate] (676.374 µs) : 0, 676
Telemetry [baseline] (7.141 ms) : 0, 7141
Telemetry [candidate] (7.088 ms) : 0, 7088
section appsec
BytebuddyAgent [baseline] (651.123 ms) : 0, 651123
BytebuddyAgent [candidate] (645.937 ms) : 0, 645937
GlobalTracer [baseline] (308.675 ms) : 0, 308675
GlobalTracer [candidate] (306.354 ms) : 0, 306354
AppSec [baseline] (137.443 ms) : 0, 137443
AppSec [candidate] (136.721 ms) : 0, 136721
Remote Config [baseline] (650.064 µs) : 0, 650
Remote Config [candidate] (646.43 µs) : 0, 646
Telemetry [baseline] (7.514 ms) : 0, 7514
Telemetry [candidate] (8.806 ms) : 0, 8806
section iast
BytebuddyAgent [baseline] (773.287 ms) : 0, 773287
BytebuddyAgent [candidate] (767.569 ms) : 0, 767569
GlobalTracer [baseline] (287.423 ms) : 0, 287423
GlobalTracer [candidate] (285.567 ms) : 0, 285567
AppSec [baseline] (46.751 ms) : 0, 46751
AppSec [candidate] (46.358 ms) : 0, 46358
IAST [baseline] (19.432 ms) : 0, 19432
IAST [candidate] (20.932 ms) : 0, 20932
Remote Config [baseline] (637.877 µs) : 0, 638
Remote Config [candidate] (638.918 µs) : 0, 639
Telemetry [baseline] (8.844 ms) : 0, 8844
Telemetry [candidate] (6.585 ms) : 0, 6585
section profiling
BytebuddyAgent [baseline] (661.591 ms) : 0, 661591
BytebuddyAgent [candidate] (660.722 ms) : 0, 660722
GlobalTracer [baseline] (380.832 ms) : 0, 380832
GlobalTracer [candidate] (378.42 ms) : 0, 378420
AppSec [baseline] (49.064 ms) : 0, 49064
AppSec [candidate] (48.943 ms) : 0, 48943
Remote Config [baseline] (695.142 µs) : 0, 695
Remote Config [candidate] (700.904 µs) : 0, 701
Telemetry [baseline] (8.147 ms) : 0, 8147
Telemetry [candidate] (7.46 ms) : 0, 7460
ProfilingAgent [baseline] (89.491 ms) : 0, 89491
ProfilingAgent [candidate] (89.195 ms) : 0, 89195
Profiling [baseline] (89.516 ms) : 0, 89516
Profiling [candidate] (89.22 ms) : 0, 89220
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.26.0-SNAPSHOT~68cb650aad, baseline=1.25.0~d1eda60b66
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.051 s) : 0, 1050853
Total [baseline] (8.759 s) : 0, 8758502
Agent [candidate] (1.051 s) : 0, 1051432
Total [candidate] (8.791 s) : 0, 8791421
section iast
Agent [baseline] (1.169 s) : 0, 1168664
Total [baseline] (9.291 s) : 0, 9291304
Agent [candidate] (1.163 s) : 0, 1163203
Total [candidate] (9.296 s) : 0, 9296024
section iast_TELEMETRY_OFF
Agent [baseline] (1.155 s) : 0, 1154511
Total [baseline] (9.239 s) : 0, 9238722
Agent [candidate] (1.159 s) : 0, 1158762
Total [candidate] (9.296 s) : 0, 9295803
gantt
title insecure-bank - break down per module: candidate=1.26.0-SNAPSHOT~68cb650aad, baseline=1.25.0~d1eda60b66
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (651.193 ms) : 0, 651193
BytebuddyAgent [candidate] (651.149 ms) : 0, 651149
GlobalTracer [baseline] (308.378 ms) : 0, 308378
GlobalTracer [candidate] (308.588 ms) : 0, 308588
AppSec [baseline] (48.891 ms) : 0, 48891
AppSec [candidate] (49.293 ms) : 0, 49293
Remote Config [baseline] (677.734 µs) : 0, 678
Remote Config [candidate] (679.299 µs) : 0, 679
Telemetry [baseline] (7.088 ms) : 0, 7088
Telemetry [candidate] (7.198 ms) : 0, 7198
section iast
BytebuddyAgent [baseline] (773.33 ms) : 0, 773330
BytebuddyAgent [candidate] (768.535 ms) : 0, 768535
GlobalTracer [baseline] (287.023 ms) : 0, 287023
GlobalTracer [candidate] (286.4 ms) : 0, 286400
AppSec [baseline] (46.567 ms) : 0, 46567
AppSec [candidate] (46.114 ms) : 0, 46114
IAST [baseline] (19.019 ms) : 0, 19019
IAST [candidate] (20.61 ms) : 0, 20610
Remote Config [baseline] (607.169 µs) : 0, 607
Remote Config [candidate] (601.031 µs) : 0, 601
Telemetry [baseline] (7.406 ms) : 0, 7406
Telemetry [candidate] (6.63 ms) : 0, 6630
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (760.433 ms) : 0, 760433
BytebuddyAgent [candidate] (764.536 ms) : 0, 764536
GlobalTracer [baseline] (285.614 ms) : 0, 285614
GlobalTracer [candidate] (285.894 ms) : 0, 285894
AppSec [baseline] (47.745 ms) : 0, 47745
AppSec [candidate] (47.121 ms) : 0, 47121
IAST [baseline] (16.937 ms) : 0, 16937
IAST [candidate] (18.865 ms) : 0, 18865
Remote Config [baseline] (620.526 µs) : 0, 621
Remote Config [candidate] (591.897 µs) : 0, 592
Telemetry [baseline] (8.687 ms) : 0, 8687
Telemetry [candidate] (7.135 ms) : 0, 7135
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 12 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.26.0-SNAPSHOT~68cb650aad, baseline=1.25.0~d1eda60b66
dateFormat X
axisFormat %s
section baseline
no_agent (1.372 ms) : 1352, 1392
. : milestone, 1372,
appsec (1.747 ms) : 1722, 1772
. : milestone, 1747,
iast (1.534 ms) : 1510, 1558
. : milestone, 1534,
profiling (1.576 ms) : 1548, 1603
. : milestone, 1576,
tracing (1.512 ms) : 1487, 1537
. : milestone, 1512,
section candidate
no_agent (1.349 ms) : 1330, 1368
. : milestone, 1349,
appsec (1.762 ms) : 1737, 1788
. : milestone, 1762,
iast (1.529 ms) : 1504, 1554
. : milestone, 1529,
profiling (1.522 ms) : 1496, 1548
. : milestone, 1522,
tracing (1.501 ms) : 1477, 1526
. : milestone, 1501,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.26.0-SNAPSHOT~68cb650aad, baseline=1.25.0~d1eda60b66
dateFormat X
axisFormat %s
section baseline
no_agent (370.571 µs) : 351, 390
. : milestone, 371,
iast (479.771 µs) : 459, 500
. : milestone, 480,
iast_FULL (542.787 µs) : 522, 563
. : milestone, 543,
iast_INACTIVE (453.494 µs) : 433, 474
. : milestone, 453,
iast_TELEMETRY_OFF (478.453 µs) : 457, 500
. : milestone, 478,
tracing (444.758 µs) : 424, 465
. : milestone, 445,
section candidate
no_agent (368.526 µs) : 349, 388
. : milestone, 369,
iast (474.708 µs) : 454, 495
. : milestone, 475,
iast_FULL (540.494 µs) : 520, 561
. : milestone, 540,
iast_INACTIVE (449.606 µs) : 429, 470
. : milestone, 450,
iast_TELEMETRY_OFF (484.144 µs) : 463, 505
. : milestone, 484,
tracing (456.827 µs) : 436, 478
. : milestone, 457,
|
romainkomorn-exdatadog
approved these changes
Dec 5, 2023
bm1549
pushed a commit
that referenced
this pull request
Dec 5, 2023
bm1549
added a commit
that referenced
this pull request
Dec 6, 2023
Cherrypick: Fix root coverage packages calculation in large repositories (#6317)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
Motivation
Both changes are needed to handle builds in repositories that contain multiple projects.
One of the things that the repository indexer does is determining the set of packages that should be instrumented with code coverage (limiting the set of packages is needed to reduce coverage overhead, as instrumenting 3rd party dependencies and core JDK classes adds a lot of overhead and serves no purpose).
The set of packages determined by the indexer is passed to Jacoco agent via the command line.
The length of the command line is finite (exact max length is OS-dependant), so the number of packages added to the command line has to be limited.
The new config property allows to manually increase the limit for those projects that might need it.
Indexing only the project folder allows to exclude packages that are known to be irrelevant.
The problem with the previous version of the code was that in a large repository (for example, CI Visibility test environment repo) the total number of packages was too big to fit the hard-coded limit, so the coverage logic degraded to instrumenting all the classes, which caused huge performance overhead.
Additional Notes
Jira ticket: CIVIS-8227