-
Notifications
You must be signed in to change notification settings - Fork 310
Move JSON generation to sender thread to improve startup time. #9197
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
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 48 metrics, 11 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.51.1-SNAPSHOT~87eebc46ec, baseline=1.51.1-SNAPSHOT~bd88ddce7a
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.044 s) : 0, 1044303
Total [baseline] (8.623 s) : 0, 8623070
Agent [candidate] (1.047 s) : 0, 1046973
Total [candidate] (8.618 s) : 0, 8618111
section iast
Agent [baseline] (1.181 s) : 0, 1181450
Total [baseline] (9.33 s) : 0, 9329766
Agent [candidate] (1.174 s) : 0, 1174207
Total [candidate] (9.312 s) : 0, 9312353
gantt
title insecure-bank - break down per module: candidate=1.51.1-SNAPSHOT~87eebc46ec, baseline=1.51.1-SNAPSHOT~bd88ddce7a
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.43 ms) : 0, 1430
crashtracking [candidate] (1.439 ms) : 0, 1439
BytebuddyAgent [baseline] (731.642 ms) : 0, 731642
BytebuddyAgent [candidate] (731.325 ms) : 0, 731325
GlobalTracer [baseline] (242.99 ms) : 0, 242990
GlobalTracer [candidate] (243.025 ms) : 0, 243025
AppSec [baseline] (30.562 ms) : 0, 30562
AppSec [candidate] (30.668 ms) : 0, 30668
Debugger [baseline] (6.085 ms) : 0, 6085
Debugger [candidate] (6.068 ms) : 0, 6068
Remote Config [baseline] (648.625 µs) : 0, 649
Remote Config [candidate] (658.814 µs) : 0, 659
Telemetry [baseline] (9.958 ms) : 0, 9958
Telemetry [candidate] (12.654 ms) : 0, 12654
section iast
crashtracking [baseline] (1.44 ms) : 0, 1440
crashtracking [candidate] (1.432 ms) : 0, 1432
BytebuddyAgent [baseline] (853.65 ms) : 0, 853650
BytebuddyAgent [candidate] (848.3 ms) : 0, 848300
GlobalTracer [baseline] (232.678 ms) : 0, 232678
GlobalTracer [candidate] (231.389 ms) : 0, 231389
IAST [baseline] (30.733 ms) : 0, 30733
IAST [candidate] (30.509 ms) : 0, 30509
AppSec [baseline] (26.453 ms) : 0, 26453
AppSec [candidate] (26.287 ms) : 0, 26287
Debugger [baseline] (6.747 ms) : 0, 6747
Debugger [candidate] (6.694 ms) : 0, 6694
Remote Config [baseline] (586.188 µs) : 0, 586
Remote Config [candidate] (597.7 µs) : 0, 598
Telemetry [baseline] (8.124 ms) : 0, 8124
Telemetry [candidate] (8.108 ms) : 0, 8108
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.51.1-SNAPSHOT~87eebc46ec, baseline=1.51.1-SNAPSHOT~bd88ddce7a
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.046 s) : 0, 1045782
Total [baseline] (10.792 s) : 0, 10792418
Agent [candidate] (1.047 s) : 0, 1046850
Total [candidate] (10.752 s) : 0, 10751872
section appsec
Agent [baseline] (1.232 s) : 0, 1231632
Total [baseline] (10.866 s) : 0, 10866147
Agent [candidate] (1.234 s) : 0, 1233786
Total [candidate] (10.817 s) : 0, 10816780
section iast
Agent [baseline] (1.178 s) : 0, 1177900
Total [baseline] (10.844 s) : 0, 10844128
Agent [candidate] (1.175 s) : 0, 1174948
Total [candidate] (10.894 s) : 0, 10894434
section profiling
Agent [baseline] (1.2 s) : 0, 1199615
Total [baseline] (10.999 s) : 0, 10999102
Agent [candidate] (1.19 s) : 0, 1190361
Total [candidate] (10.925 s) : 0, 10925407
gantt
title petclinic - break down per module: candidate=1.51.1-SNAPSHOT~87eebc46ec, baseline=1.51.1-SNAPSHOT~bd88ddce7a
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.429 ms) : 0, 1429
crashtracking [candidate] (1.435 ms) : 0, 1435
BytebuddyAgent [baseline] (731.077 ms) : 0, 731077
BytebuddyAgent [candidate] (733.075 ms) : 0, 733075
GlobalTracer [baseline] (241.847 ms) : 0, 241847
GlobalTracer [candidate] (242.604 ms) : 0, 242604
AppSec [baseline] (30.442 ms) : 0, 30442
AppSec [candidate] (30.534 ms) : 0, 30534
Debugger [baseline] (6.049 ms) : 0, 6049
Debugger [candidate] (6.083 ms) : 0, 6083
Remote Config [baseline] (648.232 µs) : 0, 648
Remote Config [candidate] (657.77 µs) : 0, 658
Telemetry [baseline] (13.3 ms) : 0, 13300
Telemetry [candidate] (10.612 ms) : 0, 10612
section appsec
crashtracking [baseline] (1.459 ms) : 0, 1459
crashtracking [candidate] (1.461 ms) : 0, 1461
BytebuddyAgent [baseline] (761.131 ms) : 0, 761131
BytebuddyAgent [candidate] (762.207 ms) : 0, 762207
GlobalTracer [baseline] (237.606 ms) : 0, 237606
GlobalTracer [candidate] (237.362 ms) : 0, 237362
AppSec [baseline] (169.169 ms) : 0, 169169
AppSec [candidate] (169.479 ms) : 0, 169479
Debugger [baseline] (7.908 ms) : 0, 7908
Debugger [candidate] (8.722 ms) : 0, 8722
Remote Config [baseline] (628.065 µs) : 0, 628
Remote Config [candidate] (626.557 µs) : 0, 627
Telemetry [baseline] (8.288 ms) : 0, 8288
Telemetry [candidate] (8.425 ms) : 0, 8425
IAST [baseline] (23.926 ms) : 0, 23926
IAST [candidate] (23.963 ms) : 0, 23963
section iast
crashtracking [baseline] (1.432 ms) : 0, 1432
crashtracking [candidate] (1.433 ms) : 0, 1433
BytebuddyAgent [baseline] (850.045 ms) : 0, 850045
BytebuddyAgent [candidate] (847.86 ms) : 0, 847860
GlobalTracer [baseline] (234.151 ms) : 0, 234151
GlobalTracer [candidate] (232.058 ms) : 0, 232058
AppSec [baseline] (29.066 ms) : 0, 29066
AppSec [candidate] (25.692 ms) : 0, 25692
Debugger [baseline] (6.727 ms) : 0, 6727
Debugger [candidate] (7.566 ms) : 0, 7566
Remote Config [baseline] (595.427 µs) : 0, 595
Remote Config [candidate] (582.891 µs) : 0, 583
Telemetry [baseline] (8.119 ms) : 0, 8119
Telemetry [candidate] (8.17 ms) : 0, 8170
IAST [baseline] (26.594 ms) : 0, 26594
IAST [candidate] (30.56 ms) : 0, 30560
section profiling
ProfilingAgent [baseline] (110.279 ms) : 0, 110279
ProfilingAgent [candidate] (108.692 ms) : 0, 108692
crashtracking [baseline] (1.405 ms) : 0, 1405
crashtracking [candidate] (1.399 ms) : 0, 1399
BytebuddyAgent [baseline] (763.681 ms) : 0, 763681
BytebuddyAgent [candidate] (758.245 ms) : 0, 758245
GlobalTracer [baseline] (221.668 ms) : 0, 221668
GlobalTracer [candidate] (220.235 ms) : 0, 220235
AppSec [baseline] (30.681 ms) : 0, 30681
AppSec [candidate] (30.2 ms) : 0, 30200
Debugger [baseline] (6.287 ms) : 0, 6287
Debugger [candidate] (6.281 ms) : 0, 6281
Remote Config [baseline] (721.774 µs) : 0, 722
Remote Config [candidate] (687.577 µs) : 0, 688
Telemetry [baseline] (15.313 ms) : 0, 15313
Telemetry [candidate] (15.437 ms) : 0, 15437
Profiling [baseline] (110.919 ms) : 0, 110919
Profiling [candidate] (109.324 ms) : 0, 109324
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 3 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.51.1-SNAPSHOT~87eebc46ec, baseline=1.51.1-SNAPSHOT~bd88ddce7a
dateFormat X
axisFormat %s
section baseline
no_agent (37.558 ms) : 37244, 37872
. : milestone, 37558,
appsec (46.111 ms) : 45699, 46523
. : milestone, 46111,
code_origins (44.308 ms) : 43934, 44682
. : milestone, 44308,
iast (43.245 ms) : 42879, 43610
. : milestone, 43245,
profiling (46.686 ms) : 46248, 47125
. : milestone, 46686,
tracing (44.223 ms) : 43852, 44594
. : milestone, 44223,
section candidate
no_agent (35.723 ms) : 35433, 36014
. : milestone, 35723,
appsec (47.676 ms) : 47256, 48096
. : milestone, 47676,
code_origins (47.369 ms) : 46956, 47782
. : milestone, 47369,
iast (44.469 ms) : 44098, 44841
. : milestone, 44469,
profiling (49.184 ms) : 48730, 49639
. : milestone, 49184,
tracing (45.267 ms) : 44884, 45649
. : milestone, 45267,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.51.1-SNAPSHOT~87eebc46ec, baseline=1.51.1-SNAPSHOT~bd88ddce7a
dateFormat X
axisFormat %s
section baseline
no_agent (4.25 ms) : 4201, 4299
. : milestone, 4250,
iast (9.315 ms) : 9158, 9472
. : milestone, 9315,
iast_FULL (13.703 ms) : 13431, 13976
. : milestone, 13703,
iast_GLOBAL (9.98 ms) : 9803, 10158
. : milestone, 9980,
profiling (8.997 ms) : 8850, 9144
. : milestone, 8997,
tracing (7.513 ms) : 7400, 7627
. : milestone, 7513,
section candidate
no_agent (4.294 ms) : 4237, 4351
. : milestone, 4294,
iast (9.316 ms) : 9163, 9469
. : milestone, 9316,
iast_FULL (14.096 ms) : 13815, 14378
. : milestone, 14096,
iast_GLOBAL (9.921 ms) : 9749, 10094
. : milestone, 9921,
profiling (9.102 ms) : 8960, 9243
. : milestone, 9102,
tracing (7.443 ms) : 7334, 7551
. : milestone, 7443,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.51.1-SNAPSHOT~87eebc46ec, baseline=1.51.1-SNAPSHOT~bd88ddce7a
dateFormat X
axisFormat %s
section baseline
no_agent (15.67 s) : 15670000, 15670000
. : milestone, 15670000,
appsec (14.599 s) : 14599000, 14599000
. : milestone, 14599000,
iast (18.704 s) : 18704000, 18704000
. : milestone, 18704000,
iast_GLOBAL (18.091 s) : 18091000, 18091000
. : milestone, 18091000,
profiling (15.32 s) : 15320000, 15320000
. : milestone, 15320000,
tracing (14.904 s) : 14904000, 14904000
. : milestone, 14904000,
section candidate
no_agent (15.411 s) : 15411000, 15411000
. : milestone, 15411000,
appsec (15.118 s) : 15118000, 15118000
. : milestone, 15118000,
iast (18.644 s) : 18644000, 18644000
. : milestone, 18644000,
iast_GLOBAL (18.294 s) : 18294000, 18294000
. : milestone, 18294000,
profiling (15.354 s) : 15354000, 15354000
. : milestone, 15354000,
tracing (14.939 s) : 14939000, 14939000
. : milestone, 14939000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.51.1-SNAPSHOT~87eebc46ec, baseline=1.51.1-SNAPSHOT~bd88ddce7a
dateFormat X
axisFormat %s
section baseline
no_agent (1.474 ms) : 1463, 1486
. : milestone, 1474,
appsec (3.583 ms) : 3370, 3797
. : milestone, 3583,
iast (2.209 ms) : 2146, 2272
. : milestone, 2209,
iast_GLOBAL (2.242 ms) : 2179, 2305
. : milestone, 2242,
profiling (2.031 ms) : 1981, 2081
. : milestone, 2031,
tracing (2.016 ms) : 1968, 2065
. : milestone, 2016,
section candidate
no_agent (1.479 ms) : 1467, 1490
. : milestone, 1479,
appsec (3.649 ms) : 3432, 3865
. : milestone, 3649,
iast (2.205 ms) : 2141, 2268
. : milestone, 2205,
iast_GLOBAL (2.233 ms) : 2171, 2296
. : milestone, 2233,
profiling (2.036 ms) : 1986, 2086
. : milestone, 2036,
tracing (2.008 ms) : 1959, 2057
. : milestone, 2008,
|
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.
Good improvement idea!
I left minor comments. I also wonder if we should start creating a dedicated class for meta
and points
and enjoy it to create a dedicated setResult()
and toJson()
method.
dd-java-agent/src/main/java/datadog/trace/bootstrap/BootstrapInitializationTelemetry.java
Outdated
Show resolved
Hide resolved
dd-java-agent/src/main/java/datadog/trace/bootstrap/BootstrapInitializationTelemetry.java
Outdated
Show resolved
Hide resolved
Yes, I have the same feeling. Will work on this idea. |
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.
Looking good thanks! 👍
Nice to see all the synchronized
moved into the Telemetry
class.
What Does This Do
Move JSON generation to sender thread to improve startup time.
Motivation
Improve agent startup time by offloading JSON generation to separate thread.