-
Notifications
You must be signed in to change notification settings - Fork 320
optimize line probe without condition #9787
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 line 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 seiralize the result, but we are sure that we are not doing for nothing.
|
🎯 Code Coverage 🔗 Commit SHA: 3856539 | 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 8 metrics, 7 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 (335.474 µs) : 275, 396
. : milestone, 335,
basic (297.428 µs) : 290, 305
. : milestone, 297,
loop (8.952 ms) : 8948, 8957
. : milestone, 8952,
section candidate
noprobe (338.072 µs) : 278, 398
. : milestone, 338,
basic (296.535 µs) : 288, 305
. : milestone, 297,
loop (8.956 ms) : 8952, 8961
. : milestone, 8956,
|
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 6 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~38565391bb, baseline=1.55.0-SNAPSHOT~33e27c7cea
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.02 s) : 0, 1019684
Total [baseline] (8.663 s) : 0, 8663232
Agent [candidate] (1.018 s) : 0, 1017593
Total [candidate] (8.65 s) : 0, 8650286
section iast
Agent [baseline] (1.158 s) : 0, 1157821
Total [baseline] (9.315 s) : 0, 9315049
Agent [candidate] (1.152 s) : 0, 1151838
Total [candidate] (9.326 s) : 0, 9325637
gantt
title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~38565391bb, baseline=1.55.0-SNAPSHOT~33e27c7cea
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.472 ms) : 0, 1472
crashtracking [candidate] (1.469 ms) : 0, 1469
BytebuddyAgent [baseline] (693.881 ms) : 0, 693881
BytebuddyAgent [candidate] (692.871 ms) : 0, 692871
GlobalTracer [baseline] (242.832 ms) : 0, 242832
GlobalTracer [candidate] (242.65 ms) : 0, 242650
AppSec [baseline] (32.448 ms) : 0, 32448
AppSec [candidate] (32.709 ms) : 0, 32709
Debugger [baseline] (6.406 ms) : 0, 6406
Debugger [candidate] (6.362 ms) : 0, 6362
Remote Config [baseline] (683.748 µs) : 0, 684
Remote Config [candidate] (675.213 µs) : 0, 675
Telemetry [baseline] (9.483 ms) : 0, 9483
Telemetry [candidate] (9.397 ms) : 0, 9397
Flare Poller [baseline] (11.261 ms) : 0, 11261
Flare Poller [candidate] (10.301 ms) : 0, 10301
section iast
crashtracking [baseline] (1.5 ms) : 0, 1500
crashtracking [candidate] (1.511 ms) : 0, 1511
BytebuddyAgent [baseline] (820.663 ms) : 0, 820663
BytebuddyAgent [candidate] (814.963 ms) : 0, 814963
GlobalTracer [baseline] (233.041 ms) : 0, 233041
GlobalTracer [candidate] (232.44 ms) : 0, 232440
IAST [baseline] (26.582 ms) : 0, 26582
IAST [candidate] (26.731 ms) : 0, 26731
AppSec [baseline] (34.566 ms) : 0, 34566
AppSec [candidate] (34.771 ms) : 0, 34771
Debugger [baseline] (6.229 ms) : 0, 6229
Debugger [candidate] (6.201 ms) : 0, 6201
Remote Config [baseline] (604.628 µs) : 0, 605
Remote Config [candidate] (614.51 µs) : 0, 615
Telemetry [baseline] (8.781 ms) : 0, 8781
Telemetry [candidate] (8.795 ms) : 0, 8795
Flare Poller [baseline] (4.245 ms) : 0, 4245
Flare Poller [candidate] (4.195 ms) : 0, 4195
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~38565391bb, baseline=1.55.0-SNAPSHOT~33e27c7cea
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.027 s) : 0, 1027447
Total [baseline] (10.807 s) : 0, 10807185
Agent [candidate] (1.017 s) : 0, 1016646
Total [candidate] (10.663 s) : 0, 10663353
section appsec
Agent [baseline] (1.193 s) : 0, 1192900
Total [baseline] (10.87 s) : 0, 10869595
Agent [candidate] (1.195 s) : 0, 1194574
Total [candidate] (10.766 s) : 0, 10765646
section iast
Agent [baseline] (1.15 s) : 0, 1149529
Total [baseline] (11.077 s) : 0, 11077177
Agent [candidate] (1.161 s) : 0, 1160947
Total [candidate] (11.165 s) : 0, 11164992
section profiling
Agent [baseline] (1.159 s) : 0, 1159326
Total [baseline] (10.932 s) : 0, 10931686
Agent [candidate] (1.161 s) : 0, 1161472
Total [candidate] (10.878 s) : 0, 10877897
gantt
title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~38565391bb, baseline=1.55.0-SNAPSHOT~33e27c7cea
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.491 ms) : 0, 1491
crashtracking [candidate] (1.455 ms) : 0, 1455
BytebuddyAgent [baseline] (698.297 ms) : 0, 698297
BytebuddyAgent [candidate] (692.925 ms) : 0, 692925
GlobalTracer [baseline] (245.164 ms) : 0, 245164
GlobalTracer [candidate] (242.911 ms) : 0, 242911
AppSec [baseline] (33.023 ms) : 0, 33023
AppSec [candidate] (32.276 ms) : 0, 32276
Debugger [baseline] (6.552 ms) : 0, 6552
Debugger [candidate] (6.348 ms) : 0, 6348
Remote Config [baseline] (696.01 µs) : 0, 696
Remote Config [candidate] (675.306 µs) : 0, 675
Telemetry [baseline] (9.612 ms) : 0, 9612
Telemetry [candidate] (9.44 ms) : 0, 9440
Flare Poller [baseline] (11.19 ms) : 0, 11190
Flare Poller [candidate] (9.435 ms) : 0, 9435
section appsec
crashtracking [baseline] (1.461 ms) : 0, 1461
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (716.297 ms) : 0, 716297
BytebuddyAgent [candidate] (717.709 ms) : 0, 717709
GlobalTracer [baseline] (234.834 ms) : 0, 234834
GlobalTracer [candidate] (235.313 ms) : 0, 235313
AppSec [baseline] (175.507 ms) : 0, 175507
AppSec [candidate] (174.898 ms) : 0, 174898
Debugger [baseline] (6.079 ms) : 0, 6079
Debugger [candidate] (6.09 ms) : 0, 6090
Remote Config [baseline] (644.205 µs) : 0, 644
Remote Config [candidate] (634.697 µs) : 0, 635
Telemetry [baseline] (8.42 ms) : 0, 8420
Telemetry [candidate] (8.518 ms) : 0, 8518
Flare Poller [baseline] (3.857 ms) : 0, 3857
Flare Poller [candidate] (3.955 ms) : 0, 3955
IAST [baseline] (24.73 ms) : 0, 24730
IAST [candidate] (24.864 ms) : 0, 24864
section iast
crashtracking [baseline] (1.466 ms) : 0, 1466
crashtracking [candidate] (1.477 ms) : 0, 1477
BytebuddyAgent [baseline] (813.173 ms) : 0, 813173
BytebuddyAgent [candidate] (822.308 ms) : 0, 822308
GlobalTracer [baseline] (232.082 ms) : 0, 232082
GlobalTracer [candidate] (233.802 ms) : 0, 233802
AppSec [baseline] (35.007 ms) : 0, 35007
AppSec [candidate] (34.332 ms) : 0, 34332
Debugger [baseline] (6.164 ms) : 0, 6164
Debugger [candidate] (7.08 ms) : 0, 7080
Remote Config [baseline] (602.48 µs) : 0, 602
Remote Config [candidate] (596.846 µs) : 0, 597
Telemetry [baseline] (8.683 ms) : 0, 8683
Telemetry [candidate] (8.666 ms) : 0, 8666
Flare Poller [baseline] (4.234 ms) : 0, 4234
Flare Poller [candidate] (4.223 ms) : 0, 4223
IAST [baseline] (26.547 ms) : 0, 26547
IAST [candidate] (26.708 ms) : 0, 26708
section profiling
ProfilingAgent [baseline] (106.962 ms) : 0, 106962
ProfilingAgent [candidate] (109.385 ms) : 0, 109385
crashtracking [baseline] (1.437 ms) : 0, 1437
crashtracking [candidate] (1.439 ms) : 0, 1439
BytebuddyAgent [baseline] (718.626 ms) : 0, 718626
BytebuddyAgent [candidate] (719.366 ms) : 0, 719366
GlobalTracer [baseline] (218.425 ms) : 0, 218425
GlobalTracer [candidate] (218.291 ms) : 0, 218291
AppSec [baseline] (32.2 ms) : 0, 32200
AppSec [candidate] (32.206 ms) : 0, 32206
Debugger [baseline] (7.421 ms) : 0, 7421
Debugger [candidate] (8.111 ms) : 0, 8111
Remote Config [baseline] (729.023 µs) : 0, 729
Remote Config [candidate] (711.287 µs) : 0, 711
Telemetry [baseline] (15.155 ms) : 0, 15155
Telemetry [candidate] (14.423 ms) : 0, 14423
Flare Poller [baseline] (4.177 ms) : 0, 4177
Flare Poller [candidate] (4.22 ms) : 0, 4220
Profiling [baseline] (109.066 ms) : 0, 109066
Profiling [candidate] (110.56 ms) : 0, 110560
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 petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~38565391bb, baseline=1.55.0-SNAPSHOT~33e27c7cea
dateFormat X
axisFormat %s
section baseline
no_agent (37.183 ms) : 36883, 37482
. : milestone, 37183,
appsec (46.715 ms) : 46317, 47114
. : milestone, 46715,
code_origins (43.955 ms) : 43584, 44326
. : milestone, 43955,
iast (44.16 ms) : 43785, 44536
. : milestone, 44160,
profiling (46.819 ms) : 46410, 47227
. : milestone, 46819,
tracing (43.174 ms) : 42801, 43546
. : milestone, 43174,
section candidate
no_agent (37.376 ms) : 37076, 37677
. : milestone, 37376,
appsec (48.437 ms) : 48012, 48863
. : milestone, 48437,
code_origins (44.068 ms) : 43677, 44459
. : milestone, 44068,
iast (44.262 ms) : 43875, 44649
. : milestone, 44262,
profiling (44.762 ms) : 44334, 45190
. : milestone, 44762,
tracing (44.417 ms) : 44023, 44811
. : milestone, 44417,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~38565391bb, baseline=1.55.0-SNAPSHOT~33e27c7cea
dateFormat X
axisFormat %s
section baseline
no_agent (4.221 ms) : 4174, 4268
. : milestone, 4221,
iast (10.34 ms) : 10166, 10515
. : milestone, 10340,
iast_FULL (14.283 ms) : 14001, 14565
. : milestone, 14283,
iast_GLOBAL (10.706 ms) : 10517, 10895
. : milestone, 10706,
profiling (9.184 ms) : 9029, 9340
. : milestone, 9184,
tracing (8.105 ms) : 7988, 8223
. : milestone, 8105,
section candidate
no_agent (4.36 ms) : 4303, 4417
. : milestone, 4360,
iast (9.765 ms) : 9601, 9929
. : milestone, 9765,
iast_FULL (14.144 ms) : 13867, 14421
. : milestone, 14144,
iast_GLOBAL (11.56 ms) : 11348, 11771
. : milestone, 11560,
profiling (9.037 ms) : 8886, 9188
. : milestone, 9037,
tracing (7.816 ms) : 7695, 7937
. : milestone, 7816,
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~38565391bb, baseline=1.55.0-SNAPSHOT~33e27c7cea
dateFormat X
axisFormat %s
section baseline
no_agent (15.57 s) : 15570000, 15570000
. : milestone, 15570000,
appsec (15.144 s) : 15144000, 15144000
. : milestone, 15144000,
iast (18.529 s) : 18529000, 18529000
. : milestone, 18529000,
iast_GLOBAL (18.094 s) : 18094000, 18094000
. : milestone, 18094000,
profiling (15.297 s) : 15297000, 15297000
. : milestone, 15297000,
tracing (15.05 s) : 15050000, 15050000
. : milestone, 15050000,
section candidate
no_agent (14.782 s) : 14782000, 14782000
. : milestone, 14782000,
appsec (15.08 s) : 15080000, 15080000
. : milestone, 15080000,
iast (18.782 s) : 18782000, 18782000
. : milestone, 18782000,
iast_GLOBAL (18.094 s) : 18094000, 18094000
. : milestone, 18094000,
profiling (15.318 s) : 15318000, 15318000
. : milestone, 15318000,
tracing (15.357 s) : 15357000, 15357000
. : milestone, 15357000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~38565391bb, baseline=1.55.0-SNAPSHOT~33e27c7cea
dateFormat X
axisFormat %s
section baseline
no_agent (1.476 ms) : 1464, 1487
. : milestone, 1476,
appsec (2.464 ms) : 2413, 2515
. : milestone, 2464,
iast (2.222 ms) : 2158, 2286
. : milestone, 2222,
iast_GLOBAL (2.259 ms) : 2194, 2324
. : milestone, 2259,
profiling (2.069 ms) : 2017, 2121
. : milestone, 2069,
tracing (2.042 ms) : 1992, 2092
. : milestone, 2042,
section candidate
no_agent (1.475 ms) : 1464, 1486
. : milestone, 1475,
appsec (3.749 ms) : 3526, 3972
. : milestone, 3749,
iast (2.21 ms) : 2146, 2273
. : milestone, 2210,
iast_GLOBAL (2.252 ms) : 2188, 2316
. : milestone, 2252,
profiling (2.071 ms) : 2018, 2123
. : milestone, 2071,
tracing (2.024 ms) : 1975, 2074
. : milestone, 2024,
|
evanchooly
left a comment
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.
a great optimization
What Does This Do
In case of a line 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 seiralize the result, but we are sure that we are not doing for nothing.
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]