-
Couldn't load subscription status.
- Fork 315
optimize method probe without condition #9834
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
In case of a method probe without condition we can move the sampling is currently done in LogProbe::evaluate to LogProbe::isReadToCapture. This way if the sample fails we return false on isReadyTocapture and no CapturedContext is created and nothing captured. If we sample the execution the CapturedContext will be created we capture the context and serialize the result, but we are sure that we are not doing for nothing. We introduce also a differentiation for single probe/multiple probe in calling evaluate that is propagated to probe implementation. it helps to differentiate the behavior based on the instrumentation
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
|
🎯 Code Coverage 🔗 Commit SHA: d96ebf4 | Docs | Was this helpful? Give us feedback! |
Debugger benchmarksParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 5 unstable metrics. See unchanged results
Request duration reports for reportsgantt
title reports - request duration [CI 0.99] : candidate=None, baseline=None
dateFormat X
axisFormat %s
section baseline
noprobe (329.314 µs) : 287, 372
. : milestone, 329,
basic (294.3 µs) : 287, 301
. : milestone, 294,
loop (8.958 ms) : 8954, 8961
. : milestone, 8958,
section candidate
noprobe (318.304 µs) : 293, 343
. : milestone, 318,
basic (295.526 µs) : 288, 303
. : milestone, 296,
loop (8.957 ms) : 8952, 8962
. : milestone, 8957,
|
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 60 metrics, 5 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~d96ebf44f3, baseline=1.55.0-SNAPSHOT~17ad12a278
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.015 s) : 0, 1014857
Total [baseline] (10.776 s) : 0, 10775684
Agent [candidate] (1.018 s) : 0, 1018093
Total [candidate] (10.717 s) : 0, 10717038
section appsec
Agent [baseline] (1.201 s) : 0, 1200874
Total [baseline] (10.757 s) : 0, 10757217
Agent [candidate] (1.205 s) : 0, 1204523
Total [candidate] (10.827 s) : 0, 10826592
section iast
Agent [baseline] (1.16 s) : 0, 1159837
Total [baseline] (11.067 s) : 0, 11066569
Agent [candidate] (1.161 s) : 0, 1160817
Total [candidate] (11.119 s) : 0, 11119261
section profiling
Agent [baseline] (1.164 s) : 0, 1163697
Total [baseline] (10.826 s) : 0, 10826324
Agent [candidate] (1.163 s) : 0, 1162562
Total [candidate] (10.764 s) : 0, 10764287
gantt
title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~d96ebf44f3, baseline=1.55.0-SNAPSHOT~17ad12a278
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.456 ms) : 0, 1456
crashtracking [candidate] (1.451 ms) : 0, 1451
BytebuddyAgent [baseline] (691.076 ms) : 0, 691076
BytebuddyAgent [candidate] (693.913 ms) : 0, 693913
GlobalTracer [baseline] (242.271 ms) : 0, 242271
GlobalTracer [candidate] (242.946 ms) : 0, 242946
AppSec [baseline] (32.344 ms) : 0, 32344
AppSec [candidate] (32.241 ms) : 0, 32241
Debugger [baseline] (6.281 ms) : 0, 6281
Debugger [candidate] (6.273 ms) : 0, 6273
Remote Config [baseline] (673.875 µs) : 0, 674
Remote Config [candidate] (672.278 µs) : 0, 672
Telemetry [baseline] (9.311 ms) : 0, 9311
Telemetry [candidate] (9.225 ms) : 0, 9225
Flare Poller [baseline] (10.283 ms) : 0, 10283
Flare Poller [candidate] (10.309 ms) : 0, 10309
section appsec
crashtracking [baseline] (1.478 ms) : 0, 1478
crashtracking [candidate] (1.466 ms) : 0, 1466
BytebuddyAgent [baseline] (723.118 ms) : 0, 723118
BytebuddyAgent [candidate] (724.914 ms) : 0, 724914
GlobalTracer [baseline] (236.032 ms) : 0, 236032
GlobalTracer [candidate] (236.867 ms) : 0, 236867
IAST [baseline] (24.953 ms) : 0, 24953
IAST [candidate] (25.252 ms) : 0, 25252
AppSec [baseline] (174.754 ms) : 0, 174754
AppSec [candidate] (175.26 ms) : 0, 175260
Debugger [baseline] (6.078 ms) : 0, 6078
Debugger [candidate] (6.13 ms) : 0, 6130
Remote Config [baseline] (635.313 µs) : 0, 635
Remote Config [candidate] (632.631 µs) : 0, 633
Telemetry [baseline] (8.573 ms) : 0, 8573
Telemetry [candidate] (8.664 ms) : 0, 8664
Flare Poller [baseline] (3.978 ms) : 0, 3978
Flare Poller [candidate] (3.994 ms) : 0, 3994
section iast
crashtracking [baseline] (1.454 ms) : 0, 1454
crashtracking [candidate] (1.468 ms) : 0, 1468
BytebuddyAgent [baseline] (821.186 ms) : 0, 821186
BytebuddyAgent [candidate] (823.415 ms) : 0, 823415
GlobalTracer [baseline] (233.098 ms) : 0, 233098
GlobalTracer [candidate] (232.678 ms) : 0, 232678
IAST [baseline] (27.169 ms) : 0, 27169
IAST [candidate] (26.847 ms) : 0, 26847
AppSec [baseline] (35.384 ms) : 0, 35384
AppSec [candidate] (35.089 ms) : 0, 35089
Debugger [baseline] (6.221 ms) : 0, 6221
Debugger [candidate] (6.138 ms) : 0, 6138
Remote Config [baseline] (602.453 µs) : 0, 602
Remote Config [candidate] (599.387 µs) : 0, 599
Telemetry [baseline] (8.775 ms) : 0, 8775
Telemetry [candidate] (8.651 ms) : 0, 8651
Flare Poller [baseline] (4.306 ms) : 0, 4306
Flare Poller [candidate] (4.333 ms) : 0, 4333
section profiling
crashtracking [baseline] (1.481 ms) : 0, 1481
crashtracking [candidate] (1.464 ms) : 0, 1464
BytebuddyAgent [baseline] (719.863 ms) : 0, 719863
BytebuddyAgent [candidate] (720.301 ms) : 0, 720301
GlobalTracer [baseline] (218.831 ms) : 0, 218831
GlobalTracer [candidate] (218.646 ms) : 0, 218646
AppSec [baseline] (32.309 ms) : 0, 32309
AppSec [candidate] (32.214 ms) : 0, 32214
Debugger [baseline] (6.626 ms) : 0, 6626
Debugger [candidate] (6.648 ms) : 0, 6648
Remote Config [baseline] (717.438 µs) : 0, 717
Remote Config [candidate] (688.166 µs) : 0, 688
Telemetry [baseline] (15.254 ms) : 0, 15254
Telemetry [candidate] (15.531 ms) : 0, 15531
Flare Poller [baseline] (4.996 ms) : 0, 4996
Flare Poller [candidate] (4.192 ms) : 0, 4192
ProfilingAgent [baseline] (109.871 ms) : 0, 109871
ProfilingAgent [candidate] (109.248 ms) : 0, 109248
Profiling [baseline] (110.489 ms) : 0, 110489
Profiling [candidate] (109.869 ms) : 0, 109869
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~d96ebf44f3, baseline=1.55.0-SNAPSHOT~17ad12a278
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.027 s) : 0, 1026863
Total [baseline] (8.676 s) : 0, 8675941
Agent [candidate] (1.02 s) : 0, 1020303
Total [candidate] (8.643 s) : 0, 8642662
section iast
Agent [baseline] (1.148 s) : 0, 1147570
Total [baseline] (9.247 s) : 0, 9247137
Agent [candidate] (1.161 s) : 0, 1160543
Total [candidate] (9.284 s) : 0, 9284372
gantt
title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~d96ebf44f3, baseline=1.55.0-SNAPSHOT~17ad12a278
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.491 ms) : 0, 1491
crashtracking [candidate] (1.462 ms) : 0, 1462
BytebuddyAgent [baseline] (700.303 ms) : 0, 700303
BytebuddyAgent [candidate] (693.894 ms) : 0, 693894
GlobalTracer [baseline] (244.276 ms) : 0, 244276
GlobalTracer [candidate] (243.634 ms) : 0, 243634
AppSec [baseline] (32.586 ms) : 0, 32586
AppSec [candidate] (32.283 ms) : 0, 32283
Debugger [baseline] (6.381 ms) : 0, 6381
Debugger [candidate] (6.291 ms) : 0, 6291
Remote Config [baseline] (684.127 µs) : 0, 684
Remote Config [candidate] (684.939 µs) : 0, 685
Telemetry [baseline] (9.473 ms) : 0, 9473
Telemetry [candidate] (9.257 ms) : 0, 9257
Flare Poller [baseline] (10.279 ms) : 0, 10279
Flare Poller [candidate] (11.657 ms) : 0, 11657
section iast
crashtracking [baseline] (1.482 ms) : 0, 1482
crashtracking [candidate] (1.495 ms) : 0, 1495
BytebuddyAgent [baseline] (812.121 ms) : 0, 812121
BytebuddyAgent [candidate] (821.757 ms) : 0, 821757
GlobalTracer [baseline] (230.905 ms) : 0, 230905
GlobalTracer [candidate] (233.419 ms) : 0, 233419
IAST [baseline] (26.625 ms) : 0, 26625
IAST [candidate] (27.012 ms) : 0, 27012
AppSec [baseline] (35.387 ms) : 0, 35387
AppSec [candidate] (35.444 ms) : 0, 35444
Debugger [baseline] (6.118 ms) : 0, 6118
Debugger [candidate] (6.169 ms) : 0, 6169
Remote Config [baseline] (605.331 µs) : 0, 605
Remote Config [candidate] (614.504 µs) : 0, 615
Telemetry [baseline] (8.713 ms) : 0, 8713
Telemetry [candidate] (8.712 ms) : 0, 8712
Flare Poller [baseline] (4.237 ms) : 0, 4237
Flare Poller [candidate] (4.361 ms) : 0, 4361
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 2 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~d96ebf44f3, baseline=1.55.0-SNAPSHOT~17ad12a278
dateFormat X
axisFormat %s
section baseline
no_agent (4.374 ms) : 4323, 4425
. : milestone, 4374,
iast (9.834 ms) : 9666, 10001
. : milestone, 9834,
iast_FULL (14.345 ms) : 14060, 14630
. : milestone, 14345,
iast_GLOBAL (10.214 ms) : 10033, 10395
. : milestone, 10214,
profiling (9.171 ms) : 9016, 9326
. : milestone, 9171,
tracing (7.66 ms) : 7544, 7776
. : milestone, 7660,
section candidate
no_agent (4.422 ms) : 4364, 4479
. : milestone, 4422,
iast (9.512 ms) : 9349, 9675
. : milestone, 9512,
iast_FULL (14.091 ms) : 13810, 14373
. : milestone, 14091,
iast_GLOBAL (10.379 ms) : 10195, 10563
. : milestone, 10379,
profiling (8.505 ms) : 8364, 8646
. : milestone, 8505,
tracing (7.783 ms) : 7673, 7894
. : milestone, 7783,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~d96ebf44f3, baseline=1.55.0-SNAPSHOT~17ad12a278
dateFormat X
axisFormat %s
section baseline
no_agent (36.07 ms) : 35777, 36363
. : milestone, 36070,
appsec (49.018 ms) : 48595, 49442
. : milestone, 49018,
code_origins (43.784 ms) : 43404, 44164
. : milestone, 43784,
iast (43.466 ms) : 43093, 43840
. : milestone, 43466,
profiling (51.18 ms) : 50664, 51696
. : milestone, 51180,
tracing (43.905 ms) : 43533, 44277
. : milestone, 43905,
section candidate
no_agent (37.793 ms) : 37479, 38107
. : milestone, 37793,
appsec (45.462 ms) : 45063, 45862
. : milestone, 45462,
code_origins (43.854 ms) : 43485, 44224
. : milestone, 43854,
iast (45.896 ms) : 45503, 46289
. : milestone, 45896,
profiling (52.249 ms) : 51707, 52790
. : milestone, 52249,
tracing (44.825 ms) : 44443, 45208
. : milestone, 44825,
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.55.0-SNAPSHOT~d96ebf44f3, baseline=1.55.0-SNAPSHOT~17ad12a278
dateFormat X
axisFormat %s
section baseline
no_agent (14.745 s) : 14745000, 14745000
. : milestone, 14745000,
appsec (15.02 s) : 15020000, 15020000
. : milestone, 15020000,
iast (18.657 s) : 18657000, 18657000
. : milestone, 18657000,
iast_GLOBAL (18.218 s) : 18218000, 18218000
. : milestone, 18218000,
profiling (15.408 s) : 15408000, 15408000
. : milestone, 15408000,
tracing (15.148 s) : 15148000, 15148000
. : milestone, 15148000,
section candidate
no_agent (14.911 s) : 14911000, 14911000
. : milestone, 14911000,
appsec (14.976 s) : 14976000, 14976000
. : milestone, 14976000,
iast (18.582 s) : 18582000, 18582000
. : milestone, 18582000,
iast_GLOBAL (18.106 s) : 18106000, 18106000
. : milestone, 18106000,
profiling (15.093 s) : 15093000, 15093000
. : milestone, 15093000,
tracing (14.985 s) : 14985000, 14985000
. : milestone, 14985000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~d96ebf44f3, baseline=1.55.0-SNAPSHOT~17ad12a278
dateFormat X
axisFormat %s
section baseline
no_agent (1.476 ms) : 1465, 1487
. : milestone, 1476,
appsec (3.666 ms) : 3453, 3880
. : milestone, 3666,
iast (2.224 ms) : 2160, 2289
. : milestone, 2224,
iast_GLOBAL (2.265 ms) : 2200, 2329
. : milestone, 2265,
profiling (2.057 ms) : 2005, 2109
. : milestone, 2057,
tracing (2.041 ms) : 1990, 2092
. : milestone, 2041,
section candidate
no_agent (1.478 ms) : 1467, 1490
. : milestone, 1478,
appsec (3.728 ms) : 3509, 3947
. : milestone, 3728,
iast (2.221 ms) : 2157, 2286
. : milestone, 2221,
iast_GLOBAL (2.268 ms) : 2203, 2334
. : milestone, 2268,
profiling (2.07 ms) : 2017, 2123
. : milestone, 2070,
tracing (2.023 ms) : 1973, 2073
. : milestone, 2023,
|
In case of a method probe without condition we can move the sampling is currently done in LogProbe::evaluate to LogProbe::isReadToCapture. This way if the sample fails we return false on isReadyTocapture and no CapturedContext is created and nothing captured. If we sample the execution the CapturedContext will be created we capture the context and serialize the result, but we are sure that we are not doing for nothing. We introduce also a differentiation for single probe/multiple probe in calling evaluate that is propagated to probe implementation. it helps to differentiate the behavior based on the instrumentation
What Does This Do
In case of a method probe without condition we can move the sampling is currently done in LogProbe::evaluate to LogProbe::isReadToCapture. This way if the sample fails we return false on isReadyTocapture and no CapturedContext is created and nothing captured. If we sample the execution the CapturedContext will be created we capture the context and serialize the result, but we are sure that we are not doing for nothing.
We introduce also a differentiation for single probe/multiple probe in calling evaluate that is propagated to probe implementation. it helps to differentiate the behavior based on the instrumentation
Motivation
Additional Notes
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]