Response blocking in openliberty#5657
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 9 performance improvements and 1 performance regressions! Performance is the same for 52 cases.
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.20.0-SNAPSHOT~bcd9abb27f, baseline=1.20.0-SNAPSHOT~e3aa415c99
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (992.491 ms) : 0, 992491
Total [baseline] (8.68 s) : 0, 8680180
Agent [candidate] (988.257 ms) : 0, 988257
Total [candidate] (8.64 s) : 0, 8640314
section appsec
Agent [baseline] (1.072 s) : 0, 1072191
Total [baseline] (8.732 s) : 0, 8732132
Agent [candidate] (1.075 s) : 0, 1075080
Total [candidate] (8.752 s) : 0, 8752406
section iast
Agent [baseline] (1.097 s) : 0, 1096876
Total [baseline] (9.22 s) : 0, 9220232
Agent [candidate] (1.096 s) : 0, 1096384
Total [candidate] (9.26 s) : 0, 9259899
section profiling
Agent [baseline] (1.167 s) : 0, 1166894
Total [baseline] (8.928 s) : 0, 8928270
Agent [candidate] (1.156 s) : 0, 1155654
Total [candidate] (8.882 s) : 0, 8881869
gantt
title insecure-bank - break down per module: candidate=1.20.0-SNAPSHOT~bcd9abb27f, baseline=1.20.0-SNAPSHOT~e3aa415c99
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (615.152 ms) : 0, 615152
BytebuddyAgent [candidate] (611.781 ms) : 0, 611781
GlobalTracer [baseline] (285.886 ms) : 0, 285886
GlobalTracer [candidate] (285.827 ms) : 0, 285827
AppSec [baseline] (50.153 ms) : 0, 50153
AppSec [candidate] (50.272 ms) : 0, 50272
Remote Config [baseline] (665.486 µs) : 0, 665
Remote Config [candidate] (671.935 µs) : 0, 672
Telemetry [baseline] (6.029 ms) : 0, 6029
Telemetry [candidate] (5.357 ms) : 0, 5357
section appsec
BytebuddyAgent [baseline] (611.526 ms) : 0, 611526
BytebuddyAgent [candidate] (613.163 ms) : 0, 613163
GlobalTracer [baseline] (283.867 ms) : 0, 283867
GlobalTracer [candidate] (286.136 ms) : 0, 286136
AppSec [baseline] (135.803 ms) : 0, 135803
AppSec [candidate] (135.347 ms) : 0, 135347
Remote Config [baseline] (728.98 µs) : 0, 729
Remote Config [candidate] (721.727 µs) : 0, 722
Telemetry [baseline] (5.772 ms) : 0, 5772
Telemetry [candidate] (5.218 ms) : 0, 5218
section iast
BytebuddyAgent [baseline] (722.429 ms) : 0, 722429
BytebuddyAgent [candidate] (721.297 ms) : 0, 721297
GlobalTracer [baseline] (272.222 ms) : 0, 272222
GlobalTracer [candidate] (273.455 ms) : 0, 273455
AppSec [baseline] (47.277 ms) : 0, 47277
AppSec [candidate] (46.834 ms) : 0, 46834
Remote Config [baseline] (562.01 µs) : 0, 562
Remote Config [candidate] (611.208 µs) : 0, 611
Telemetry [baseline] (5.794 ms) : 0, 5794
Telemetry [candidate] (5.175 ms) : 0, 5175
IAST [baseline] (13.968 ms) : 0, 13968
IAST [candidate] (14.35 ms) : 0, 14350
section profiling
BytebuddyAgent [baseline] (628.723 ms) : 0, 628723
BytebuddyAgent [candidate] (623.826 ms) : 0, 623826
GlobalTracer [baseline] (351.285 ms) : 0, 351285
GlobalTracer [candidate] (349.213 ms) : 0, 349213
AppSec [baseline] (49.616 ms) : 0, 49616
AppSec [candidate] (48.984 ms) : 0, 48984
Remote Config [baseline] (664.026 µs) : 0, 664
Remote Config [candidate] (634.169 µs) : 0, 634
Telemetry [baseline] (5.987 ms) : 0, 5987
Telemetry [candidate] (5.331 ms) : 0, 5331
ProfilingAgent [baseline] (77.148 ms) : 0, 77148
ProfilingAgent [candidate] (74.881 ms) : 0, 74881
Profiling [baseline] (77.172 ms) : 0, 77172
Profiling [candidate] (74.905 ms) : 0, 74905
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.20.0-SNAPSHOT~bcd9abb27f, baseline=1.20.0-SNAPSHOT~e3aa415c99
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (988.078 ms) : 0, 988078
Total [baseline] (9.258 s) : 0, 9258459
Agent [candidate] (989.48 ms) : 0, 989480
Total [candidate] (9.17 s) : 0, 9169876
section appsec
Agent [baseline] (1.081 s) : 0, 1080967
Total [baseline] (9.289 s) : 0, 9289427
Agent [candidate] (1.072 s) : 0, 1072456
Total [candidate] (9.281 s) : 0, 9281296
section iast
Agent [baseline] (1.101 s) : 0, 1100739
Total [baseline] (9.516 s) : 0, 9515939
Agent [candidate] (1.089 s) : 0, 1088886
Total [candidate] (9.442 s) : 0, 9442365
section profiling
Agent [baseline] (1.165 s) : 0, 1164667
Total [baseline] (9.482 s) : 0, 9482174
Agent [candidate] (1.16 s) : 0, 1159839
Total [candidate] (9.48 s) : 0, 9480351
gantt
title petclinic - break down per module: candidate=1.20.0-SNAPSHOT~bcd9abb27f, baseline=1.20.0-SNAPSHOT~e3aa415c99
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (612.591 ms) : 0, 612591
BytebuddyAgent [candidate] (613.257 ms) : 0, 613257
GlobalTracer [baseline] (284.213 ms) : 0, 284213
GlobalTracer [candidate] (285.897 ms) : 0, 285897
AppSec [baseline] (50.207 ms) : 0, 50207
AppSec [candidate] (49.914 ms) : 0, 49914
Remote Config [baseline] (665.036 µs) : 0, 665
Remote Config [candidate] (662.244 µs) : 0, 662
Telemetry [baseline] (6.051 ms) : 0, 6051
Telemetry [candidate] (5.413 ms) : 0, 5413
section appsec
BytebuddyAgent [baseline] (616.331 ms) : 0, 616331
BytebuddyAgent [candidate] (612.156 ms) : 0, 612156
GlobalTracer [baseline] (286.956 ms) : 0, 286956
GlobalTracer [candidate] (285.235 ms) : 0, 285235
AppSec [baseline] (136.493 ms) : 0, 136493
AppSec [candidate] (134.933 ms) : 0, 134933
Remote Config [baseline] (734.954 µs) : 0, 735
Remote Config [candidate] (726.814 µs) : 0, 727
Telemetry [baseline] (5.783 ms) : 0, 5783
Telemetry [candidate] (5.215 ms) : 0, 5215
section iast
BytebuddyAgent [baseline] (723.895 ms) : 0, 723895
BytebuddyAgent [candidate] (715.354 ms) : 0, 715354
GlobalTracer [baseline] (273.96 ms) : 0, 273960
GlobalTracer [candidate] (272.051 ms) : 0, 272051
AppSec [baseline] (47.593 ms) : 0, 47593
AppSec [candidate] (46.956 ms) : 0, 46956
Remote Config [baseline] (589.421 µs) : 0, 589
Remote Config [candidate] (622.833 µs) : 0, 623
Telemetry [baseline] (5.965 ms) : 0, 5965
Telemetry [candidate] (5.22 ms) : 0, 5220
IAST [baseline] (14.19 ms) : 0, 14190
IAST [candidate] (14.323 ms) : 0, 14323
section profiling
BytebuddyAgent [baseline] (628.274 ms) : 0, 628274
BytebuddyAgent [candidate] (625.539 ms) : 0, 625539
GlobalTracer [baseline] (351.472 ms) : 0, 351472
GlobalTracer [candidate] (350.458 ms) : 0, 350458
AppSec [baseline] (49.361 ms) : 0, 49361
AppSec [candidate] (49.025 ms) : 0, 49025
Remote Config [baseline] (665.257 µs) : 0, 665
Remote Config [candidate] (640.727 µs) : 0, 641
Telemetry [baseline] (5.981 ms) : 0, 5981
Telemetry [candidate] (5.367 ms) : 0, 5367
ProfilingAgent [baseline] (75.573 ms) : 0, 75573
ProfilingAgent [candidate] (75.906 ms) : 0, 75906
Profiling [baseline] (75.597 ms) : 0, 75597
Profiling [candidate] (75.931 ms) : 0, 75931
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 24 cases. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.20.0-SNAPSHOT~bcd9abb27f, baseline=1.20.0-SNAPSHOT~e3aa415c99
dateFormat X
axisFormat %s
section baseline
no_agent (368.768 µs) : 347, 390
. : milestone, 369,
appsec (663.53 µs) : 643, 684
. : milestone, 664,
iast (460.048 µs) : 440, 481
. : milestone, 460,
iast_FULL (530.09 µs) : 510, 551
. : milestone, 530,
iast_INACTIVE (446.951 µs) : 425, 469
. : milestone, 447,
profiling (451.446 µs) : 430, 473
. : milestone, 451,
tracing (442.452 µs) : 422, 463
. : milestone, 442,
section candidate
no_agent (370.855 µs) : 349, 393
. : milestone, 371,
appsec (663.276 µs) : 643, 684
. : milestone, 663,
iast (458.118 µs) : 437, 479
. : milestone, 458,
iast_FULL (531.823 µs) : 511, 553
. : milestone, 532,
iast_INACTIVE (446.173 µs) : 425, 468
. : milestone, 446,
profiling (438.473 µs) : 418, 459
. : milestone, 438,
tracing (446.754 µs) : 425, 468
. : milestone, 447,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.20.0-SNAPSHOT~bcd9abb27f, baseline=1.20.0-SNAPSHOT~e3aa415c99
dateFormat X
axisFormat %s
section baseline
no_agent (1.36 ms) : 1341, 1380
. : milestone, 1360,
appsec (1.685 ms) : 1661, 1710
. : milestone, 1685,
iast (1.484 ms) : 1460, 1508
. : milestone, 1484,
profiling (1.479 ms) : 1455, 1504
. : milestone, 1479,
tracing (1.445 ms) : 1420, 1470
. : milestone, 1445,
section candidate
no_agent (1.335 ms) : 1316, 1354
. : milestone, 1335,
appsec (1.667 ms) : 1642, 1692
. : milestone, 1667,
iast (1.45 ms) : 1425, 1474
. : milestone, 1450,
profiling (1.501 ms) : 1475, 1527
. : milestone, 1501,
tracing (1.439 ms) : 1415, 1463
. : milestone, 1439,
|
19aa36c to
a53fefb
Compare
manuel-alvarez-alvarez
left a comment
There was a problem hiding this comment.
Take my review with a grain of salt, I'm no blocking expert and just entered the PR to learn a bit, but looks good to me.
|
|
||
| import datadog.trace.bootstrap.instrumentation.decorator.HttpServerDecorator; | ||
|
|
||
| public class LibertyDecoratorHolder { |
There was a problem hiding this comment.
Is this holder needed?, seems it's not used
There was a problem hiding this comment.
Thanks, it's a leftover from an earlier version.
| import net.bytebuddy.description.type.TypeDefinition; | ||
| import net.bytebuddy.matcher.ElementMatcher; | ||
|
|
||
| public class ArrayOfTypeMatcher<T extends TypeDefinition> |
There was a problem hiding this comment.
Looks to me that this might be useful in other cases and can be moved alongside the other matchers
There was a problem hiding this comment.
I looked into this but it doesn't seem to fit the matchers in package package datadog.trace.agent.tooling.bytebuddy.matcher. They're all rather specialized, including a set of matchers behind an interface there's 3 implementations of.
| request.setAttribute(CorrelationIdentifier.getSpanIdKey(), GlobalTracer.get().getSpanId()); | ||
|
|
||
| if (ActiveSubsystems.APPSEC_ACTIVE) { | ||
| ContextStore store = |
There was a problem hiding this comment.
Out of curiosity, is this is a performance improvement to speed up access to the span using the context store instead of the TL?
There was a problem hiding this comment.
No, that's not it. This advice is applied to the servlet layer. The span is saved on line 110 above on the request attributes. However, the servlet layer is unreachable on the advice that runs upon response commit, which happens on a lower layer. As such, I have to reach into the guts of the request object for an object that belongs to this lower layer in order to associate the span with it.
|
|
||
| static class HandleExceptionAdvice { | ||
| @Advice.OnMethodEnter(suppress = Throwable.class, skipOn = Advice.OnNonDefaultValue.class) | ||
| static boolean /* skip */ before(@Advice.Argument(0) Throwable throwable_) { |
There was a problem hiding this comment.
Does the skip make sense without an OnMethodExit?
There was a problem hiding this comment.
Sure. The return method on the advice serves two purposes. With skipOn it can be used to skip the method body and it can be retrieved on OnMethodExit with @Advice.Enter. In this case I'm only skipping its body; i don't need to do anything on an OnMethodExit like setting the return value (this is a void method being instrumented).
359bfa9 to
bcd9abb
Compare
bcd9abb to
6b07089
Compare
No description provided.