Caching the primaryInstrumentationName#10477
Caching the primaryInstrumentationName#10477gh-worker-dd-mergequeue-cf854d[bot] merged 12 commits intomasterfrom
Conversation
Caching the primaryInstrumentationName to avoid repeatedly calling instrumentationNames() and constantly allocating a String[]
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 62 metrics, 9 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.59.0-SNAPSHOT~1bb69b2b03, baseline=1.60.0-SNAPSHOT~fe400cf048
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.072 s) : 0, 1071554
Total [baseline] (8.802 s) : 0, 8801765
Agent [candidate] (1.08 s) : 0, 1079785
Total [candidate] (8.767 s) : 0, 8767398
section iast
Agent [baseline] (1.228 s) : 0, 1227731
Total [baseline] (9.409 s) : 0, 9409096
Agent [candidate] (1.235 s) : 0, 1234634
Total [candidate] (9.425 s) : 0, 9425094
gantt
title insecure-bank - break down per module: candidate=1.59.0-SNAPSHOT~1bb69b2b03, baseline=1.60.0-SNAPSHOT~fe400cf048
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.214 ms) : 0, 1214
crashtracking [candidate] (1.222 ms) : 0, 1222
BytebuddyAgent [baseline] (632.626 ms) : 0, 632626
BytebuddyAgent [candidate] (636.566 ms) : 0, 636566
AgentMeter [baseline] (29.31 ms) : 0, 29310
AgentMeter [candidate] (29.524 ms) : 0, 29524
GlobalTracer [baseline] (258.914 ms) : 0, 258914
GlobalTracer [candidate] (260.501 ms) : 0, 260501
AppSec [baseline] (33.301 ms) : 0, 33301
AppSec [candidate] (33.611 ms) : 0, 33611
Debugger [baseline] (63.211 ms) : 0, 63211
Debugger [candidate] (65.996 ms) : 0, 65996
Remote Config [baseline] (621.849 µs) : 0, 622
Remote Config [candidate] (615.624 µs) : 0, 616
Telemetry [baseline] (10.814 ms) : 0, 10814
Telemetry [candidate] (10.038 ms) : 0, 10038
Flare Poller [baseline] (5.353 ms) : 0, 5353
Flare Poller [candidate] (5.339 ms) : 0, 5339
section iast
crashtracking [baseline] (1.202 ms) : 0, 1202
crashtracking [candidate] (1.21 ms) : 0, 1210
BytebuddyAgent [baseline] (793.239 ms) : 0, 793239
BytebuddyAgent [candidate] (797.891 ms) : 0, 797891
AgentMeter [baseline] (11.26 ms) : 0, 11260
AgentMeter [candidate] (11.308 ms) : 0, 11308
GlobalTracer [baseline] (247.167 ms) : 0, 247167
GlobalTracer [candidate] (248.702 ms) : 0, 248702
IAST [baseline] (26.88 ms) : 0, 26880
IAST [candidate] (27.357 ms) : 0, 27357
AppSec [baseline] (29.776 ms) : 0, 29776
AppSec [candidate] (32.998 ms) : 0, 32998
Debugger [baseline] (69.827 ms) : 0, 69827
Debugger [candidate] (66.563 ms) : 0, 66563
Remote Config [baseline] (521.17 µs) : 0, 521
Remote Config [candidate] (532.301 µs) : 0, 532
Telemetry [baseline] (8.575 ms) : 0, 8575
Telemetry [candidate] (8.595 ms) : 0, 8595
Flare Poller [baseline] (3.395 ms) : 0, 3395
Flare Poller [candidate] (3.454 ms) : 0, 3454
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.59.0-SNAPSHOT~1bb69b2b03, baseline=1.60.0-SNAPSHOT~fe400cf048
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.067 s) : 0, 1067331
Total [baseline] (10.929 s) : 0, 10929181
Agent [candidate] (1.068 s) : 0, 1068244
Total [candidate] (10.907 s) : 0, 10907332
section appsec
Agent [baseline] (1.24 s) : 0, 1240164
Total [baseline] (11.136 s) : 0, 11135677
Agent [candidate] (1.24 s) : 0, 1240278
Total [candidate] (11.11 s) : 0, 11109707
section iast
Agent [baseline] (1.234 s) : 0, 1234091
Total [baseline] (11.303 s) : 0, 11302904
Agent [candidate] (1.234 s) : 0, 1233747
Total [candidate] (11.281 s) : 0, 11280781
section profiling
Agent [baseline] (1.193 s) : 0, 1192717
Total [baseline] (10.942 s) : 0, 10942489
Agent [candidate] (1.193 s) : 0, 1193482
Total [candidate] (11.035 s) : 0, 11035187
gantt
title petclinic - break down per module: candidate=1.59.0-SNAPSHOT~1bb69b2b03, baseline=1.60.0-SNAPSHOT~fe400cf048
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.197 ms) : 0, 1197
crashtracking [candidate] (1.194 ms) : 0, 1194
BytebuddyAgent [baseline] (629.202 ms) : 0, 629202
BytebuddyAgent [candidate] (630.772 ms) : 0, 630772
AgentMeter [baseline] (29.179 ms) : 0, 29179
AgentMeter [candidate] (28.943 ms) : 0, 28943
GlobalTracer [baseline] (258.055 ms) : 0, 258055
GlobalTracer [candidate] (257.211 ms) : 0, 257211
AppSec [baseline] (32.955 ms) : 0, 32955
AppSec [candidate] (32.943 ms) : 0, 32943
Debugger [baseline] (66.579 ms) : 0, 66579
Debugger [candidate] (64.452 ms) : 0, 64452
Remote Config [baseline] (601.495 µs) : 0, 601
Remote Config [candidate] (617.622 µs) : 0, 618
Telemetry [baseline] (9.079 ms) : 0, 9079
Telemetry [candidate] (12.308 ms) : 0, 12308
Flare Poller [baseline] (4.466 ms) : 0, 4466
Flare Poller [candidate] (3.743 ms) : 0, 3743
section appsec
crashtracking [baseline] (1.217 ms) : 0, 1217
crashtracking [candidate] (1.204 ms) : 0, 1204
BytebuddyAgent [baseline] (658.151 ms) : 0, 658151
BytebuddyAgent [candidate] (658.603 ms) : 0, 658603
AgentMeter [baseline] (11.94 ms) : 0, 11940
AgentMeter [candidate] (11.953 ms) : 0, 11953
GlobalTracer [baseline] (258.376 ms) : 0, 258376
GlobalTracer [candidate] (258.397 ms) : 0, 258397
IAST [baseline] (25.364 ms) : 0, 25364
IAST [candidate] (25.289 ms) : 0, 25289
AppSec [baseline] (167.995 ms) : 0, 167995
AppSec [candidate] (167.935 ms) : 0, 167935
Debugger [baseline] (67.21 ms) : 0, 67210
Debugger [candidate] (67.017 ms) : 0, 67017
Remote Config [baseline] (637.695 µs) : 0, 638
Remote Config [candidate] (665.01 µs) : 0, 665
Telemetry [baseline] (9.451 ms) : 0, 9451
Telemetry [candidate] (9.493 ms) : 0, 9493
Flare Poller [baseline] (3.785 ms) : 0, 3785
Flare Poller [candidate] (3.735 ms) : 0, 3735
section iast
crashtracking [baseline] (1.208 ms) : 0, 1208
crashtracking [candidate] (1.195 ms) : 0, 1195
BytebuddyAgent [baseline] (797.365 ms) : 0, 797365
BytebuddyAgent [candidate] (796.97 ms) : 0, 796970
AgentMeter [baseline] (11.278 ms) : 0, 11278
AgentMeter [candidate] (11.301 ms) : 0, 11301
GlobalTracer [baseline] (248.05 ms) : 0, 248050
GlobalTracer [candidate] (248.133 ms) : 0, 248133
IAST [baseline] (27.064 ms) : 0, 27064
IAST [candidate] (26.98 ms) : 0, 26980
AppSec [baseline] (32.927 ms) : 0, 32927
AppSec [candidate] (34.579 ms) : 0, 34579
Debugger [baseline] (67.332 ms) : 0, 67332
Debugger [candidate] (66.16 ms) : 0, 66160
Remote Config [baseline] (537.678 µs) : 0, 538
Remote Config [candidate] (526.916 µs) : 0, 527
Telemetry [baseline] (8.754 ms) : 0, 8754
Telemetry [candidate] (8.599 ms) : 0, 8599
Flare Poller [baseline] (3.518 ms) : 0, 3518
Flare Poller [candidate] (3.387 ms) : 0, 3387
section profiling
crashtracking [baseline] (1.201 ms) : 0, 1201
crashtracking [candidate] (1.184 ms) : 0, 1184
BytebuddyAgent [baseline] (683.975 ms) : 0, 683975
BytebuddyAgent [candidate] (680.845 ms) : 0, 680845
AgentMeter [baseline] (8.542 ms) : 0, 8542
AgentMeter [candidate] (8.617 ms) : 0, 8617
GlobalTracer [baseline] (215.909 ms) : 0, 215909
GlobalTracer [candidate] (217.959 ms) : 0, 217959
AppSec [baseline] (32.692 ms) : 0, 32692
AppSec [candidate] (33.073 ms) : 0, 33073
Debugger [baseline] (67.284 ms) : 0, 67284
Debugger [candidate] (67.608 ms) : 0, 67608
Remote Config [baseline] (616.581 µs) : 0, 617
Remote Config [candidate] (628.947 µs) : 0, 629
Telemetry [baseline] (8.936 ms) : 0, 8936
Telemetry [candidate] (8.944 ms) : 0, 8944
Flare Poller [baseline] (3.728 ms) : 0, 3728
Flare Poller [candidate] (3.761 ms) : 0, 3761
ProfilingAgent [baseline] (98.908 ms) : 0, 98908
ProfilingAgent [candidate] (100.406 ms) : 0, 100406
Profiling [baseline] (99.483 ms) : 0, 99483
Profiling [candidate] (100.992 ms) : 0, 100992
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 1 performance regressions! Performance is the same for 16 metrics, 17 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~1bb69b2b03, baseline=1.60.0-SNAPSHOT~fe400cf048
dateFormat X
axisFormat %s
section baseline
no_agent (18.068 ms) : 17884, 18252
. : milestone, 18068,
appsec (18.772 ms) : 18581, 18964
. : milestone, 18772,
code_origins (17.904 ms) : 17724, 18084
. : milestone, 17904,
iast (17.657 ms) : 17484, 17831
. : milestone, 17657,
profiling (21.433 ms) : 21215, 21652
. : milestone, 21433,
tracing (17.874 ms) : 17697, 18050
. : milestone, 17874,
section candidate
no_agent (17.562 ms) : 17384, 17740
. : milestone, 17562,
appsec (18.598 ms) : 18406, 18789
. : milestone, 18598,
code_origins (17.69 ms) : 17514, 17866
. : milestone, 17690,
iast (17.638 ms) : 17461, 17815
. : milestone, 17638,
profiling (18.763 ms) : 18575, 18952
. : milestone, 18763,
tracing (17.672 ms) : 17492, 17851
. : milestone, 17672,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~1bb69b2b03, baseline=1.60.0-SNAPSHOT~fe400cf048
dateFormat X
axisFormat %s
section baseline
no_agent (1.168 ms) : 1157, 1180
. : milestone, 1168,
iast (3.21 ms) : 3163, 3257
. : milestone, 3210,
iast_FULL (6.076 ms) : 6013, 6138
. : milestone, 6076,
iast_GLOBAL (3.616 ms) : 3549, 3683
. : milestone, 3616,
profiling (2.045 ms) : 2027, 2062
. : milestone, 2045,
tracing (1.887 ms) : 1870, 1904
. : milestone, 1887,
section candidate
no_agent (1.243 ms) : 1230, 1256
. : milestone, 1243,
iast (3.195 ms) : 3156, 3234
. : milestone, 3195,
iast_FULL (5.837 ms) : 5779, 5896
. : milestone, 5837,
iast_GLOBAL (3.579 ms) : 3530, 3629
. : milestone, 3579,
profiling (2.409 ms) : 2385, 2432
. : milestone, 2409,
tracing (1.883 ms) : 1867, 1898
. : milestone, 1883,
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 tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~1bb69b2b03, baseline=1.60.0-SNAPSHOT~fe400cf048
dateFormat X
axisFormat %s
section baseline
no_agent (1.47 ms) : 1459, 1482
. : milestone, 1470,
appsec (3.715 ms) : 3498, 3933
. : milestone, 3715,
iast (2.244 ms) : 2175, 2313
. : milestone, 2244,
iast_GLOBAL (2.292 ms) : 2223, 2362
. : milestone, 2292,
profiling (2.068 ms) : 2013, 2122
. : milestone, 2068,
tracing (2.055 ms) : 2001, 2109
. : milestone, 2055,
section candidate
no_agent (1.465 ms) : 1454, 1477
. : milestone, 1465,
appsec (3.803 ms) : 3580, 4026
. : milestone, 3803,
iast (2.243 ms) : 2174, 2312
. : milestone, 2243,
iast_GLOBAL (2.287 ms) : 2218, 2357
. : milestone, 2287,
profiling (2.074 ms) : 2020, 2129
. : milestone, 2074,
tracing (2.056 ms) : 2002, 2110
. : milestone, 2056,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~1bb69b2b03, baseline=1.60.0-SNAPSHOT~fe400cf048
dateFormat X
axisFormat %s
section baseline
no_agent (15.063 s) : 15063000, 15063000
. : milestone, 15063000,
appsec (14.783 s) : 14783000, 14783000
. : milestone, 14783000,
iast (17.976 s) : 17976000, 17976000
. : milestone, 17976000,
iast_GLOBAL (17.865 s) : 17865000, 17865000
. : milestone, 17865000,
profiling (15.05 s) : 15050000, 15050000
. : milestone, 15050000,
tracing (14.62 s) : 14620000, 14620000
. : milestone, 14620000,
section candidate
no_agent (15.29 s) : 15290000, 15290000
. : milestone, 15290000,
appsec (14.937 s) : 14937000, 14937000
. : milestone, 14937000,
iast (18.242 s) : 18242000, 18242000
. : milestone, 18242000,
iast_GLOBAL (17.901 s) : 17901000, 17901000
. : milestone, 17901000,
profiling (15.726 s) : 15726000, 15726000
. : milestone, 15726000,
tracing (14.58 s) : 14580000, 14580000
. : milestone, 14580000,
|
Realized that the caching is unnecessary complication Just use a final field instead
…m:DataDog/dd-trace-java into dougqh/cache-primary-instrumentation-name
PerfectSlayer
left a comment
There was a problem hiding this comment.
👏 praise: Thanks!
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
This PR is rejected because it was updated |
|
/merge |
|
View all feedbacks in Devflow UI.
PR already in the queue with status in_progress |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What Does This Do
Caching the primaryInstrumentationName to avoid repeatedly calling instrumentationNames and constantly allocating a String[]
Motivation
Avoid repetitive work and memory allocation
Additional Notes
The high load benchmarks are known to be flaky, but I wanted to double check the regressions anyway.
In a local load test, this change performed as expected...
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]