Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Rework Kotlin coroutines instrumentation around coroutine context #8774

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mcculls
Copy link
Contributor

@mcculls mcculls commented May 6, 2025

What Does This Do

The previous approach associated the scope state with the job (coroutine) instance using field-injection. However this doesn't work when the coroutine instance might be recreated or wrapped by something else.

This new approach creates a DatadogThreadContextElement for every coroutine context created. The scope state is then lazily captured within this element: either after non-lazy coroutines are constructed, when lazy coroutines start, or failing that when the element is first used to update the thread context.

At the same time it captures the active span using a continuation to avoid the trace from completing before the coroutine is complete. Note there is no need to (re)activate the continuation when switching contexts because we have already captured the scope state.

Motivation

This simpler instrumentation will be easier to move over to the new Context API

This also fixes the scenario described in https://github.com/arun-rama/KotlinCoroutineTracingIssueRepro/tree/main

Additional Notes

As an added benefit, this approach does not require field injection

Contributor Checklist

Jira ticket: AIDM-602

@mcculls mcculls added tag: do not merge Do not merge changes type: refactoring inst: kotlin Kotlin instrumentation labels May 6, 2025
@pr-commenter
Copy link

pr-commenter bot commented May 6, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/rework-kotlin-instrumentation
git_commit_date 1746825821 1746988841
git_commit_sha f494c33 7ba1f604c9
release_version 1.50.0-SNAPSHOT~f494c33b01 1.50.0-SNAPSHOT~37ba1f604c9
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1746990692 1746990692
ci_job_id 932712655 932712655
ci_pipeline_id 64733063 64733063
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-njbofxpe-project-304-concurrent-0-n32nc1bw 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-njbofxpe-project-304-concurrent-0-n32nc1bw 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None
variant iast iast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 55 metrics, 16 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~37ba1f604c9, baseline=1.50.0-SNAPSHOT~f494c33b01

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.023 s) : 0, 1022887
Total [baseline] (8.665 s) : 0, 8664515
Agent [candidate] (1.025 s) : 0, 1025194
Total [candidate] (8.644 s) : 0, 8643900
section iast
Agent [baseline] (1.149 s) : 0, 1148626
Total [baseline] (9.269 s) : 0, 9269333
Agent [candidate] (1.165 s) : 0, 1164653
Total [candidate] (9.286 s) : 0, 9286475
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.161 s) : 0, 1160792
Total [baseline] (9.26 s) : 0, 9260437
Agent [candidate] (1.157 s) : 0, 1157487
Total [candidate] (9.235 s) : 0, 9234777
section iast_TELEMETRY_OFF
Agent [baseline] (1.152 s) : 0, 1152491
Total [baseline] (9.284 s) : 0, 9283688
Agent [candidate] (1.146 s) : 0, 1146319
Total [candidate] (9.237 s) : 0, 9237344
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.023 s -
Agent iast 1.149 s 125.74 ms (12.3%)
Agent iast_HARDCODED_SECRET_DISABLED 1.161 s 137.905 ms (13.5%)
Agent iast_TELEMETRY_OFF 1.152 s 129.605 ms (12.7%)
Total tracing 8.665 s -
Total iast 9.269 s 604.818 ms (7.0%)
Total iast_HARDCODED_SECRET_DISABLED 9.26 s 595.921 ms (6.9%)
Total iast_TELEMETRY_OFF 9.284 s 619.172 ms (7.1%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.025 s -
Agent iast 1.165 s 139.459 ms (13.6%)
Agent iast_HARDCODED_SECRET_DISABLED 1.157 s 132.292 ms (12.9%)
Agent iast_TELEMETRY_OFF 1.146 s 121.125 ms (11.8%)
Total tracing 8.644 s -
Total iast 9.286 s 642.575 ms (7.4%)
Total iast_HARDCODED_SECRET_DISABLED 9.235 s 590.876 ms (6.8%)
Total iast_TELEMETRY_OFF 9.237 s 593.444 ms (6.9%)
gantt
    title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~37ba1f604c9, baseline=1.50.0-SNAPSHOT~f494c33b01

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (684.658 ms) : 0, 684658
BytebuddyAgent [candidate] (686.668 ms) : 0, 686668
GlobalTracer [baseline] (241.001 ms) : 0, 241001
GlobalTracer [candidate] (239.454 ms) : 0, 239454
AppSec [baseline] (55.289 ms) : 0, 55289
AppSec [candidate] (54.309 ms) : 0, 54309
Debugger [baseline] (8.498 ms) : 0, 8498
Debugger [candidate] (9.958 ms) : 0, 9958
Remote Config [baseline] (696.465 µs) : 0, 696
Remote Config [candidate] (691.662 µs) : 0, 692
Telemetry [baseline] (9.157 ms) : 0, 9157
Telemetry [candidate] (10.519 ms) : 0, 10519
section iast
BytebuddyAgent [baseline] (801.175 ms) : 0, 801175
BytebuddyAgent [candidate] (813.532 ms) : 0, 813532
GlobalTracer [baseline] (230.966 ms) : 0, 230966
GlobalTracer [candidate] (233.491 ms) : 0, 233491
IAST [baseline] (27.56 ms) : 0, 27560
IAST [candidate] (28.586 ms) : 0, 28586
AppSec [baseline] (50.981 ms) : 0, 50981
AppSec [candidate] (50.049 ms) : 0, 50049
Debugger [baseline] (5.941 ms) : 0, 5941
Debugger [candidate] (5.958 ms) : 0, 5958
Remote Config [baseline] (588.609 µs) : 0, 589
Remote Config [candidate] (588.383 µs) : 0, 588
Telemetry [baseline] (7.879 ms) : 0, 7879
Telemetry [candidate] (7.985 ms) : 0, 7985
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (810.25 ms) : 0, 810250
BytebuddyAgent [candidate] (808.488 ms) : 0, 808488
GlobalTracer [baseline] (232.532 ms) : 0, 232532
GlobalTracer [candidate] (231.977 ms) : 0, 231977
IAST [baseline] (31.213 ms) : 0, 31213
IAST [candidate] (27.013 ms) : 0, 27013
AppSec [baseline] (48.431 ms) : 0, 48431
AppSec [candidate] (51.944 ms) : 0, 51944
Debugger [baseline] (6.0 ms) : 0, 6000
Debugger [candidate] (5.944 ms) : 0, 5944
Remote Config [baseline] (601.901 µs) : 0, 602
Remote Config [candidate] (591.775 µs) : 0, 592
Telemetry [baseline] (8.056 ms) : 0, 8056
Telemetry [candidate] (7.875 ms) : 0, 7875
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (804.041 ms) : 0, 804041
BytebuddyAgent [candidate] (799.911 ms) : 0, 799911
GlobalTracer [baseline] (231.525 ms) : 0, 231525
GlobalTracer [candidate] (230.639 ms) : 0, 230639
IAST [baseline] (24.828 ms) : 0, 24828
IAST [candidate] (22.188 ms) : 0, 22188
AppSec [baseline] (53.944 ms) : 0, 53944
AppSec [candidate] (54.97 ms) : 0, 54970
Debugger [baseline] (6.078 ms) : 0, 6078
Debugger [candidate] (5.902 ms) : 0, 5902
Remote Config [baseline] (609.543 µs) : 0, 610
Remote Config [candidate] (581.5 µs) : 0, 581
Telemetry [baseline] (7.92 ms) : 0, 7920
Telemetry [candidate] (7.755 ms) : 0, 7755
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~37ba1f604c9, baseline=1.50.0-SNAPSHOT~f494c33b01

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.017 s) : 0, 1017425
Total [baseline] (10.564 s) : 0, 10564348
Agent [candidate] (1.021 s) : 0, 1021095
Total [candidate] (10.518 s) : 0, 10518193
section appsec
Agent [baseline] (1.162 s) : 0, 1161793
Total [baseline] (10.709 s) : 0, 10708953
Agent [candidate] (1.173 s) : 0, 1173412
Total [candidate] (10.692 s) : 0, 10692401
section iast
Agent [baseline] (1.152 s) : 0, 1151977
Total [baseline] (10.906 s) : 0, 10906097
Agent [candidate] (1.151 s) : 0, 1150989
Total [candidate] (10.849 s) : 0, 10849061
section profiling
Agent [baseline] (1.282 s) : 0, 1282440
Total [baseline] (10.975 s) : 0, 10975121
Agent [candidate] (1.292 s) : 0, 1291996
Total [candidate] (10.837 s) : 0, 10836805
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.017 s -
Agent appsec 1.162 s 144.368 ms (14.2%)
Agent iast 1.152 s 134.552 ms (13.2%)
Agent profiling 1.282 s 265.014 ms (26.0%)
Total tracing 10.564 s -
Total appsec 10.709 s 144.605 ms (1.4%)
Total iast 10.906 s 341.749 ms (3.2%)
Total profiling 10.975 s 410.773 ms (3.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.021 s -
Agent appsec 1.173 s 152.317 ms (14.9%)
Agent iast 1.151 s 129.894 ms (12.7%)
Agent profiling 1.292 s 270.901 ms (26.5%)
Total tracing 10.518 s -
Total appsec 10.692 s 174.209 ms (1.7%)
Total iast 10.849 s 330.869 ms (3.1%)
Total profiling 10.837 s 318.612 ms (3.0%)
gantt
    title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~37ba1f604c9, baseline=1.50.0-SNAPSHOT~f494c33b01

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (681.846 ms) : 0, 681846
BytebuddyAgent [candidate] (683.782 ms) : 0, 683782
GlobalTracer [baseline] (239.743 ms) : 0, 239743
GlobalTracer [candidate] (240.509 ms) : 0, 240509
AppSec [baseline] (54.958 ms) : 0, 54958
AppSec [candidate] (54.276 ms) : 0, 54276
Debugger [baseline] (7.663 ms) : 0, 7663
Debugger [candidate] (7.653 ms) : 0, 7653
Remote Config [baseline] (700.979 µs) : 0, 701
Remote Config [candidate] (700.466 µs) : 0, 700
Telemetry [baseline] (9.047 ms) : 0, 9047
Telemetry [candidate] (10.701 ms) : 0, 10701
section appsec
BytebuddyAgent [baseline] (700.454 ms) : 0, 700454
BytebuddyAgent [candidate] (709.083 ms) : 0, 709083
GlobalTracer [baseline] (236.868 ms) : 0, 236868
GlobalTracer [candidate] (239.15 ms) : 0, 239150
AppSec [baseline] (174.926 ms) : 0, 174926
AppSec [candidate] (176.584 ms) : 0, 176584
Debugger [baseline] (5.964 ms) : 0, 5964
Debugger [candidate] (5.947 ms) : 0, 5947
Remote Config [baseline] (620.509 µs) : 0, 621
Remote Config [candidate] (627.502 µs) : 0, 628
Telemetry [baseline] (8.566 ms) : 0, 8566
Telemetry [candidate] (7.385 ms) : 0, 7385
IAST [baseline] (21.685 ms) : 0, 21685
IAST [candidate] (21.757 ms) : 0, 21757
section iast
BytebuddyAgent [baseline] (804.456 ms) : 0, 804456
BytebuddyAgent [candidate] (804.066 ms) : 0, 804066
GlobalTracer [baseline] (230.693 ms) : 0, 230693
GlobalTracer [candidate] (231.045 ms) : 0, 231045
AppSec [baseline] (49.539 ms) : 0, 49539
AppSec [candidate] (51.644 ms) : 0, 51644
Debugger [baseline] (5.93 ms) : 0, 5930
Debugger [candidate] (5.846 ms) : 0, 5846
Remote Config [baseline] (606.929 µs) : 0, 607
Remote Config [candidate] (591.612 µs) : 0, 592
Telemetry [baseline] (7.936 ms) : 0, 7936
Telemetry [candidate] (7.829 ms) : 0, 7829
IAST [baseline] (29.276 ms) : 0, 29276
IAST [candidate] (24.938 ms) : 0, 24938
section profiling
BytebuddyAgent [baseline] (674.433 ms) : 0, 674433
BytebuddyAgent [candidate] (679.228 ms) : 0, 679228
GlobalTracer [baseline] (378.856 ms) : 0, 378856
GlobalTracer [candidate] (381.291 ms) : 0, 381291
AppSec [baseline] (54.726 ms) : 0, 54726
AppSec [candidate] (54.411 ms) : 0, 54411
Debugger [baseline] (6.123 ms) : 0, 6123
Debugger [candidate] (6.228 ms) : 0, 6228
Remote Config [baseline] (660.299 µs) : 0, 660
Remote Config [candidate] (653.734 µs) : 0, 654
Telemetry [baseline] (8.092 ms) : 0, 8092
Telemetry [candidate] (8.258 ms) : 0, 8258
ProfilingAgent [baseline] (109.001 ms) : 0, 109001
ProfilingAgent [candidate] (110.95 ms) : 0, 110950
Profiling [baseline] (109.026 ms) : 0, 109026
Profiling [candidate] (110.977 ms) : 0, 110977
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-05-11T18:43:58 2025-05-11T18:51:47
git_branch master mcculls/rework-kotlin-instrumentation
git_commit_date 1746825821 1746988970
git_commit_sha f494c33 7ba1f604c9
release_version 1.50.0-SNAPSHOT~f494c33b01 1.50.0-SNAPSHOT~37ba1f604c9
start_time 2025-05-11T18:43:44 2025-05-11T18:51:32
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1746989907 1746989907
ci_job_id 932712656 932712656
ci_pipeline_id 64733063 64733063
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-ujqpvmht-project-304-concurrent-0-9skn415o 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-ujqpvmht-project-304-concurrent-0-9skn415o 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
variant iast iast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 18 unstable metrics.

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~37ba1f604c9, baseline=1.50.0-SNAPSHOT~f494c33b01
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.369 ms) : 1349, 1389
.   : milestone, 1369,
appsec (1.74 ms) : 1717, 1764
.   : milestone, 1740,
appsec_no_iast (1.747 ms) : 1724, 1770
.   : milestone, 1747,
code_origins (1.687 ms) : 1660, 1713
.   : milestone, 1687,
iast (1.526 ms) : 1502, 1549
.   : milestone, 1526,
profiling (1.56 ms) : 1535, 1585
.   : milestone, 1560,
tracing (1.505 ms) : 1482, 1528
.   : milestone, 1505,
section candidate
no_agent (1.378 ms) : 1358, 1397
.   : milestone, 1378,
appsec (1.758 ms) : 1735, 1782
.   : milestone, 1758,
appsec_no_iast (1.728 ms) : 1705, 1751
.   : milestone, 1728,
code_origins (1.69 ms) : 1663, 1717
.   : milestone, 1690,
iast (1.542 ms) : 1518, 1567
.   : milestone, 1542,
profiling (1.529 ms) : 1505, 1553
.   : milestone, 1529,
tracing (1.514 ms) : 1491, 1536
.   : milestone, 1514,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.369 ms [1.349 ms, 1.389 ms] -
appsec 1.74 ms [1.717 ms, 1.764 ms] 370.961 µs (27.1%)
appsec_no_iast 1.747 ms [1.724 ms, 1.77 ms] 377.832 µs (27.6%)
code_origins 1.687 ms [1.66 ms, 1.713 ms] 317.345 µs (23.2%)
iast 1.526 ms [1.502 ms, 1.549 ms] 156.335 µs (11.4%)
profiling 1.56 ms [1.535 ms, 1.585 ms] 190.9 µs (13.9%)
tracing 1.505 ms [1.482 ms, 1.528 ms] 135.854 µs (9.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.378 ms [1.358 ms, 1.397 ms] -
appsec 1.758 ms [1.735 ms, 1.782 ms] 380.881 µs (27.7%)
appsec_no_iast 1.728 ms [1.705 ms, 1.751 ms] 350.46 µs (25.4%)
code_origins 1.69 ms [1.663 ms, 1.717 ms] 312.228 µs (22.7%)
iast 1.542 ms [1.518 ms, 1.567 ms] 164.723 µs (12.0%)
profiling 1.529 ms [1.505 ms, 1.553 ms] 151.304 µs (11.0%)
tracing 1.514 ms [1.491 ms, 1.536 ms] 136.054 µs (9.9%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~37ba1f604c9, baseline=1.50.0-SNAPSHOT~f494c33b01
    dateFormat X
    axisFormat %s
section baseline
no_agent (387.116 µs) : 367, 407
.   : milestone, 387,
iast (522.562 µs) : 499, 546
.   : milestone, 523,
iast_FULL (742.318 µs) : 720, 764
.   : milestone, 742,
iast_GLOBAL (574.731 µs) : 553, 596
.   : milestone, 575,
iast_HARDCODED_SECRET_DISABLED (533.659 µs) : 511, 556
.   : milestone, 534,
iast_INACTIVE (477.418 µs) : 455, 500
.   : milestone, 477,
iast_TELEMETRY_OFF (521.982 µs) : 500, 544
.   : milestone, 522,
tracing (475.291 µs) : 453, 498
.   : milestone, 475,
section candidate
no_agent (385.625 µs) : 366, 406
.   : milestone, 386,
iast (531.692 µs) : 509, 554
.   : milestone, 532,
iast_FULL (743.579 µs) : 720, 767
.   : milestone, 744,
iast_GLOBAL (576.151 µs) : 554, 598
.   : milestone, 576,
iast_HARDCODED_SECRET_DISABLED (531.656 µs) : 509, 554
.   : milestone, 532,
iast_INACTIVE (477.367 µs) : 456, 499
.   : milestone, 477,
iast_TELEMETRY_OFF (512.75 µs) : 490, 536
.   : milestone, 513,
tracing (465.495 µs) : 443, 488
.   : milestone, 465,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 387.116 µs [367.019 µs, 407.213 µs] -
iast 522.562 µs [499.231 µs, 545.892 µs] 135.446 µs (35.0%)
iast_FULL 742.318 µs [720.264 µs, 764.372 µs] 355.202 µs (91.8%)
iast_GLOBAL 574.731 µs [553.074 µs, 596.388 µs] 187.615 µs (48.5%)
iast_HARDCODED_SECRET_DISABLED 533.659 µs [510.923 µs, 556.395 µs] 146.543 µs (37.9%)
iast_INACTIVE 477.418 µs [454.601 µs, 500.235 µs] 90.302 µs (23.3%)
iast_TELEMETRY_OFF 521.982 µs [499.631 µs, 544.334 µs] 134.866 µs (34.8%)
tracing 475.291 µs [452.761 µs, 497.821 µs] 88.175 µs (22.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 385.625 µs [365.56 µs, 405.691 µs] -
iast 531.692 µs [509.401 µs, 553.983 µs] 146.067 µs (37.9%)
iast_FULL 743.579 µs [719.876 µs, 767.281 µs] 357.953 µs (92.8%)
iast_GLOBAL 576.151 µs [554.0 µs, 598.302 µs] 190.526 µs (49.4%)
iast_HARDCODED_SECRET_DISABLED 531.656 µs [509.063 µs, 554.248 µs] 146.03 µs (37.9%)
iast_INACTIVE 477.367 µs [455.543 µs, 499.191 µs] 91.742 µs (23.8%)
iast_TELEMETRY_OFF 512.75 µs [489.631 µs, 535.869 µs] 127.125 µs (33.0%)
tracing 465.495 µs [443.329 µs, 487.661 µs] 79.87 µs (20.7%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/rework-kotlin-instrumentation
git_commit_date 1746825821 1746988970
git_commit_sha f494c33 7ba1f604c9
release_version 1.50.0-SNAPSHOT~f494c33b01 1.50.0-SNAPSHOT~37ba1f604c9
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1746990405 1746990405
ci_job_id 932712657 932712657
ci_pipeline_id 64733063 64733063
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-njbofxpe-project-304-concurrent-1-fyp059s1 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-njbofxpe-project-304-concurrent-1-fyp059s1 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
variant appsec appsec

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~37ba1f604c9, baseline=1.50.0-SNAPSHOT~f494c33b01
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.949 s) : 14949000, 14949000
.   : milestone, 14949000,
appsec (15.064 s) : 15064000, 15064000
.   : milestone, 15064000,
iast (19.029 s) : 19029000, 19029000
.   : milestone, 19029000,
iast_GLOBAL (18.069 s) : 18069000, 18069000
.   : milestone, 18069000,
profiling (15.749 s) : 15749000, 15749000
.   : milestone, 15749000,
tracing (15.05 s) : 15050000, 15050000
.   : milestone, 15050000,
section candidate
no_agent (14.922 s) : 14922000, 14922000
.   : milestone, 14922000,
appsec (15.091 s) : 15091000, 15091000
.   : milestone, 15091000,
iast (19.059 s) : 19059000, 19059000
.   : milestone, 19059000,
iast_GLOBAL (17.698 s) : 17698000, 17698000
.   : milestone, 17698000,
profiling (15.07 s) : 15070000, 15070000
.   : milestone, 15070000,
tracing (14.842 s) : 14842000, 14842000
.   : milestone, 14842000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.949 s [14.949 s, 14.949 s] -
appsec 15.064 s [15.064 s, 15.064 s] 115.0 ms (0.8%)
iast 19.029 s [19.029 s, 19.029 s] 4.08 s (27.3%)
iast_GLOBAL 18.069 s [18.069 s, 18.069 s] 3.12 s (20.9%)
profiling 15.749 s [15.749 s, 15.749 s] 800.0 ms (5.4%)
tracing 15.05 s [15.05 s, 15.05 s] 101.0 ms (0.7%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.922 s [14.922 s, 14.922 s] -
appsec 15.091 s [15.091 s, 15.091 s] 169.0 ms (1.1%)
iast 19.059 s [19.059 s, 19.059 s] 4.137 s (27.7%)
iast_GLOBAL 17.698 s [17.698 s, 17.698 s] 2.776 s (18.6%)
profiling 15.07 s [15.07 s, 15.07 s] 148.0 ms (1.0%)
tracing 14.842 s [14.842 s, 14.842 s] -80.0 ms (-0.5%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~37ba1f604c9, baseline=1.50.0-SNAPSHOT~f494c33b01
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.48 ms) : 1468, 1492
.   : milestone, 1480,
appsec (2.433 ms) : 2384, 2483
.   : milestone, 2433,
iast (2.198 ms) : 2135, 2260
.   : milestone, 2198,
iast_GLOBAL (2.265 ms) : 2201, 2328
.   : milestone, 2265,
profiling (2.034 ms) : 1984, 2083
.   : milestone, 2034,
tracing (2.029 ms) : 1981, 2077
.   : milestone, 2029,
section candidate
no_agent (1.484 ms) : 1472, 1495
.   : milestone, 1484,
appsec (2.424 ms) : 2375, 2474
.   : milestone, 2424,
iast (2.198 ms) : 2136, 2260
.   : milestone, 2198,
iast_GLOBAL (2.244 ms) : 2182, 2307
.   : milestone, 2244,
profiling (2.07 ms) : 2019, 2121
.   : milestone, 2070,
tracing (2.018 ms) : 1970, 2066
.   : milestone, 2018,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.48 ms [1.468 ms, 1.492 ms] -
appsec 2.433 ms [2.384 ms, 2.483 ms] 953.366 µs (64.4%)
iast 2.198 ms [2.135 ms, 2.26 ms] 717.621 µs (48.5%)
iast_GLOBAL 2.265 ms [2.201 ms, 2.328 ms] 784.491 µs (53.0%)
profiling 2.034 ms [1.984 ms, 2.083 ms] 553.596 µs (37.4%)
tracing 2.029 ms [1.981 ms, 2.077 ms] 549.078 µs (37.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.484 ms [1.472 ms, 1.495 ms] -
appsec 2.424 ms [2.375 ms, 2.474 ms] 940.499 µs (63.4%)
iast 2.198 ms [2.136 ms, 2.26 ms] 714.034 µs (48.1%)
iast_GLOBAL 2.244 ms [2.182 ms, 2.307 ms] 760.597 µs (51.3%)
profiling 2.07 ms [2.019 ms, 2.121 ms] 585.835 µs (39.5%)
tracing 2.018 ms [1.97 ms, 2.066 ms] 534.32 µs (36.0%)

@mcculls mcculls changed the title WIP: Rework Kotlin coroutines instrumentation around coroutine context Rework Kotlin coroutines instrumentation around coroutine context May 7, 2025
@mcculls mcculls force-pushed the mcculls/rework-kotlin-instrumentation branch 4 times, most recently from a77d8bd to 06b989f Compare May 7, 2025 15:04
@mcculls mcculls removed the tag: do not merge Do not merge changes label May 7, 2025
@mcculls mcculls marked this pull request as ready for review May 7, 2025 16:13
@mcculls mcculls requested review from a team as code owners May 7, 2025 16:13
@mcculls mcculls requested review from amarziali and PerfectSlayer May 7, 2025 16:13
@mcculls mcculls added tag: no release notes Changes to exclude from release notes and removed tag: no release notes Changes to exclude from release notes labels May 7, 2025
@mcculls mcculls force-pushed the mcculls/rework-kotlin-instrumentation branch 3 times, most recently from 48b5305 to 37ba1f6 Compare May 11, 2025 18:23
As an added benefit, this approach does not require field injection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inst: kotlin Kotlin instrumentation type: refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant