-
Notifications
You must be signed in to change notification settings - Fork 292
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
apply rate limit to queue events #7823
Conversation
d6340d3
to
c161211
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 50 metrics, 13 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.42.0-SNAPSHOT~116c7d8357, baseline=1.42.0-SNAPSHOT~21334c5b41
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.081 s) : 0, 1080906
Total [baseline] (10.48 s) : 0, 10480426
Agent [candidate] (1.079 s) : 0, 1078800
Total [candidate] (10.379 s) : 0, 10379390
section appsec
Agent [baseline] (1.214 s) : 0, 1214453
Total [baseline] (10.648 s) : 0, 10647592
Agent [candidate] (1.221 s) : 0, 1221366
Total [candidate] (10.6 s) : 0, 10599689
section iast
Agent [baseline] (1.214 s) : 0, 1213936
Total [baseline] (10.931 s) : 0, 10930798
Agent [candidate] (1.214 s) : 0, 1214487
Total [candidate] (10.875 s) : 0, 10875275
section profiling
Agent [baseline] (1.277 s) : 0, 1277317
Total [baseline] (10.754 s) : 0, 10753503
Agent [candidate] (1.277 s) : 0, 1276588
Total [candidate] (10.724 s) : 0, 10723722
gantt
title petclinic - break down per module: candidate=1.42.0-SNAPSHOT~116c7d8357, baseline=1.42.0-SNAPSHOT~21334c5b41
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (686.905 ms) : 0, 686905
BytebuddyAgent [candidate] (685.704 ms) : 0, 685704
GlobalTracer [baseline] (314.625 ms) : 0, 314625
GlobalTracer [candidate] (314.196 ms) : 0, 314196
AppSec [baseline] (54.625 ms) : 0, 54625
AppSec [candidate] (54.734 ms) : 0, 54734
Remote Config [baseline] (661.719 µs) : 0, 662
Remote Config [candidate] (649.951 µs) : 0, 650
Telemetry [baseline] (10.442 ms) : 0, 10442
Telemetry [candidate] (9.887 ms) : 0, 9887
section appsec
BytebuddyAgent [baseline] (704.308 ms) : 0, 704308
BytebuddyAgent [candidate] (708.08 ms) : 0, 708080
GlobalTracer [baseline] (312.01 ms) : 0, 312010
GlobalTracer [candidate] (313.959 ms) : 0, 313959
AppSec [baseline] (165.357 ms) : 0, 165357
AppSec [candidate] (167.138 ms) : 0, 167138
Remote Config [baseline] (637.151 µs) : 0, 637
Remote Config [candidate] (646.095 µs) : 0, 646
Telemetry [baseline] (7.726 ms) : 0, 7726
Telemetry [candidate] (8.515 ms) : 0, 8515
IAST [baseline] (21.575 ms) : 0, 21575
IAST [candidate] (18.636 ms) : 0, 18636
section iast
BytebuddyAgent [baseline] (808.215 ms) : 0, 808215
BytebuddyAgent [candidate] (809.583 ms) : 0, 809583
GlobalTracer [baseline] (305.456 ms) : 0, 305456
GlobalTracer [candidate] (305.251 ms) : 0, 305251
AppSec [baseline] (57.497 ms) : 0, 57497
AppSec [candidate] (57.938 ms) : 0, 57938
Remote Config [baseline] (601.944 µs) : 0, 602
Remote Config [candidate] (606.081 µs) : 0, 606
Telemetry [baseline] (7.394 ms) : 0, 7394
Telemetry [candidate] (7.389 ms) : 0, 7389
IAST [baseline] (21.029 ms) : 0, 21029
IAST [candidate] (19.962 ms) : 0, 19962
section profiling
BytebuddyAgent [baseline] (680.128 ms) : 0, 680128
BytebuddyAgent [candidate] (679.946 ms) : 0, 679946
GlobalTracer [baseline] (397.723 ms) : 0, 397723
GlobalTracer [candidate] (398.028 ms) : 0, 398028
AppSec [baseline] (55.232 ms) : 0, 55232
AppSec [candidate] (54.954 ms) : 0, 54954
Remote Config [baseline] (665.892 µs) : 0, 666
Remote Config [candidate] (660.408 µs) : 0, 660
Telemetry [baseline] (12.294 ms) : 0, 12294
Telemetry [candidate] (12.702 ms) : 0, 12702
ProfilingAgent [baseline] (92.588 ms) : 0, 92588
ProfilingAgent [candidate] (91.669 ms) : 0, 91669
Profiling [baseline] (92.611 ms) : 0, 92611
Profiling [candidate] (91.693 ms) : 0, 91693
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.42.0-SNAPSHOT~116c7d8357, baseline=1.42.0-SNAPSHOT~21334c5b41
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.083 s) : 0, 1082555
Total [baseline] (8.569 s) : 0, 8568765
Agent [candidate] (1.082 s) : 0, 1082144
Total [candidate] (8.561 s) : 0, 8560601
section iast
Agent [baseline] (1.212 s) : 0, 1212008
Total [baseline] (9.147 s) : 0, 9147421
Agent [candidate] (1.205 s) : 0, 1204746
Total [candidate] (9.113 s) : 0, 9112892
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.212 s) : 0, 1211598
Total [baseline] (9.116 s) : 0, 9116485
Agent [candidate] (1.23 s) : 0, 1230406
Total [candidate] (9.136 s) : 0, 9136481
section iast_TELEMETRY_OFF
Agent [baseline] (1.209 s) : 0, 1208909
Total [baseline] (9.094 s) : 0, 9094407
Agent [candidate] (1.203 s) : 0, 1203035
Total [candidate] (9.074 s) : 0, 9074490
gantt
title insecure-bank - break down per module: candidate=1.42.0-SNAPSHOT~116c7d8357, baseline=1.42.0-SNAPSHOT~21334c5b41
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (688.516 ms) : 0, 688516
BytebuddyAgent [candidate] (686.961 ms) : 0, 686961
GlobalTracer [baseline] (315.104 ms) : 0, 315104
GlobalTracer [candidate] (314.962 ms) : 0, 314962
AppSec [baseline] (54.85 ms) : 0, 54850
AppSec [candidate] (54.779 ms) : 0, 54779
Remote Config [baseline] (668.968 µs) : 0, 669
Remote Config [candidate] (680.306 µs) : 0, 680
Telemetry [baseline] (9.767 ms) : 0, 9767
Telemetry [candidate] (11.145 ms) : 0, 11145
section iast
BytebuddyAgent [baseline] (807.09 ms) : 0, 807090
BytebuddyAgent [candidate] (802.051 ms) : 0, 802051
GlobalTracer [baseline] (305.382 ms) : 0, 305382
GlobalTracer [candidate] (303.14 ms) : 0, 303140
AppSec [baseline] (58.028 ms) : 0, 58028
AppSec [candidate] (55.841 ms) : 0, 55841
IAST [baseline] (19.738 ms) : 0, 19738
IAST [candidate] (22.167 ms) : 0, 22167
Remote Config [baseline] (609.879 µs) : 0, 610
Remote Config [candidate] (602.041 µs) : 0, 602
Telemetry [baseline] (7.398 ms) : 0, 7398
Telemetry [candidate] (7.268 ms) : 0, 7268
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (806.525 ms) : 0, 806525
BytebuddyAgent [candidate] (819.625 ms) : 0, 819625
GlobalTracer [baseline] (304.942 ms) : 0, 304942
GlobalTracer [candidate] (309.259 ms) : 0, 309259
AppSec [baseline] (57.435 ms) : 0, 57435
AppSec [candidate] (58.441 ms) : 0, 58441
IAST [baseline] (20.91 ms) : 0, 20910
IAST [candidate] (20.948 ms) : 0, 20948
Remote Config [baseline] (611.41 µs) : 0, 611
Remote Config [candidate] (620.213 µs) : 0, 620
Telemetry [baseline] (7.497 ms) : 0, 7497
Telemetry [candidate] (7.596 ms) : 0, 7596
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (804.304 ms) : 0, 804304
BytebuddyAgent [candidate] (801.432 ms) : 0, 801432
GlobalTracer [baseline] (305.224 ms) : 0, 305224
GlobalTracer [candidate] (302.734 ms) : 0, 302734
AppSec [baseline] (57.502 ms) : 0, 57502
AppSec [candidate] (57.07 ms) : 0, 57070
IAST [baseline] (20.241 ms) : 0, 20241
IAST [candidate] (19.423 ms) : 0, 19423
Remote Config [baseline] (603.257 µs) : 0, 603
Remote Config [candidate] (599.526 µs) : 0, 600
Telemetry [baseline] (7.334 ms) : 0, 7334
Telemetry [candidate] (8.109 ms) : 0, 8109
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 18 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.42.0-SNAPSHOT~116c7d8357, baseline=1.42.0-SNAPSHOT~21334c5b41
dateFormat X
axisFormat %s
section baseline
no_agent (1.333 ms) : 1314, 1353
. : milestone, 1333,
appsec (1.738 ms) : 1715, 1762
. : milestone, 1738,
appsec_no_iast (1.722 ms) : 1698, 1746
. : milestone, 1722,
iast (1.488 ms) : 1466, 1510
. : milestone, 1488,
profiling (1.487 ms) : 1464, 1510
. : milestone, 1487,
tracing (1.483 ms) : 1459, 1507
. : milestone, 1483,
section candidate
no_agent (1.346 ms) : 1326, 1366
. : milestone, 1346,
appsec (1.727 ms) : 1704, 1751
. : milestone, 1727,
appsec_no_iast (1.727 ms) : 1702, 1751
. : milestone, 1727,
iast (1.466 ms) : 1443, 1489
. : milestone, 1466,
profiling (1.528 ms) : 1504, 1552
. : milestone, 1528,
tracing (1.476 ms) : 1451, 1501
. : milestone, 1476,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.42.0-SNAPSHOT~116c7d8357, baseline=1.42.0-SNAPSHOT~21334c5b41
dateFormat X
axisFormat %s
section baseline
no_agent (367.662 µs) : 348, 387
. : milestone, 368,
iast (493.741 µs) : 472, 516
. : milestone, 494,
iast_FULL (642.439 µs) : 621, 664
. : milestone, 642,
iast_GLOBAL (511.671 µs) : 490, 533
. : milestone, 512,
iast_HARDCODED_SECRET_DISABLED (488.86 µs) : 468, 510
. : milestone, 489,
iast_INACTIVE (446.062 µs) : 425, 467
. : milestone, 446,
iast_TELEMETRY_OFF (470.817 µs) : 450, 492
. : milestone, 471,
tracing (442.613 µs) : 422, 463
. : milestone, 443,
section candidate
no_agent (371.918 µs) : 352, 392
. : milestone, 372,
iast (484.569 µs) : 463, 506
. : milestone, 485,
iast_FULL (644.043 µs) : 623, 665
. : milestone, 644,
iast_GLOBAL (515.372 µs) : 494, 537
. : milestone, 515,
iast_HARDCODED_SECRET_DISABLED (481.62 µs) : 461, 503
. : milestone, 482,
iast_INACTIVE (458.69 µs) : 438, 479
. : milestone, 459,
iast_TELEMETRY_OFF (481.196 µs) : 458, 504
. : milestone, 481,
tracing (443.997 µs) : 423, 465
. : milestone, 444,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.42.0-SNAPSHOT~116c7d8357, baseline=1.42.0-SNAPSHOT~21334c5b41
dateFormat X
axisFormat %s
section baseline
no_agent (1.462 ms) : 1451, 1474
. : milestone, 1462,
appsec (2.325 ms) : 2284, 2367
. : milestone, 2325,
iast (2.065 ms) : 2013, 2117
. : milestone, 2065,
iast_GLOBAL (2.111 ms) : 2059, 2164
. : milestone, 2111,
profiling (1.942 ms) : 1900, 1984
. : milestone, 1942,
tracing (1.917 ms) : 1876, 1957
. : milestone, 1917,
section candidate
no_agent (1.461 ms) : 1450, 1473
. : milestone, 1461,
appsec (2.338 ms) : 2296, 2379
. : milestone, 2338,
iast (2.073 ms) : 2020, 2125
. : milestone, 2073,
iast_GLOBAL (2.113 ms) : 2061, 2166
. : milestone, 2113,
profiling (1.926 ms) : 1886, 1967
. : milestone, 1926,
tracing (1.924 ms) : 1883, 1965
. : milestone, 1924,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.42.0-SNAPSHOT~116c7d8357, baseline=1.42.0-SNAPSHOT~21334c5b41
dateFormat X
axisFormat %s
section baseline
no_agent (15.664 s) : 15664000, 15664000
. : milestone, 15664000,
appsec (15.294 s) : 15294000, 15294000
. : milestone, 15294000,
iast (19.048 s) : 19048000, 19048000
. : milestone, 19048000,
iast_GLOBAL (17.93 s) : 17930000, 17930000
. : milestone, 17930000,
profiling (15.062 s) : 15062000, 15062000
. : milestone, 15062000,
tracing (15.015 s) : 15015000, 15015000
. : milestone, 15015000,
section candidate
no_agent (15.431 s) : 15431000, 15431000
. : milestone, 15431000,
appsec (15.113 s) : 15113000, 15113000
. : milestone, 15113000,
iast (18.821 s) : 18821000, 18821000
. : milestone, 18821000,
iast_GLOBAL (17.915 s) : 17915000, 17915000
. : milestone, 17915000,
profiling (15.619 s) : 15619000, 15619000
. : milestone, 15619000,
tracing (15.29 s) : 15290000, 15290000
. : milestone, 15290000,
|
6c5b955
to
60ecdaa
Compare
internal-api/src/main/java/datadog/trace/api/sampling/PerRecordingRateLimiter.java
Outdated
Show resolved
Hide resolved
internal-api/src/main/java/datadog/trace/api/sampling/PerRecordingRateLimiter.java
Outdated
Show resolved
Hide resolved
Converting back to draft because this is going to require more work to support graal |
…itialisation to support rate limiting
@jbachorik you noticed some debugging artifacts, they've been removed. |
|
||
public class QueueTimerHelper { | ||
|
||
private static final class RateLimiterHolder { | ||
// indirection to prevent needing to instantiate the class and its transitive dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Did you add this preemptively, or was NI analysis complaining for a build?
What Does This Do
Avoids creating huge numbers of queue time events in degenerate cases. Typically we see a few hundred of these per recording.
Motivation
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]