-
Notifications
You must be signed in to change notification settings - Fork 312
Make test span serialization idempotent #9456
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
base: master
Are you sure you want to change the base?
Conversation
🎯 Code Coverage 🔗 Commit SHA: aa9d3fa | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 49 metrics, 10 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.53.0-SNAPSHOT~aa9d3fae34, baseline=1.53.0-SNAPSHOT~030f9bbb36
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.068 s) : 0, 1068165
Total [baseline] (10.879 s) : 0, 10879177
Agent [candidate] (1.051 s) : 0, 1051002
Total [candidate] (10.788 s) : 0, 10787971
section appsec
Agent [baseline] (1.228 s) : 0, 1227638
Total [baseline] (10.789 s) : 0, 10788813
Agent [candidate] (1.227 s) : 0, 1226887
Total [candidate] (10.807 s) : 0, 10807023
section iast
Agent [baseline] (1.182 s) : 0, 1182438
Total [baseline] (11.012 s) : 0, 11011805
Agent [candidate] (1.181 s) : 0, 1181311
Total [candidate] (10.975 s) : 0, 10975189
section profiling
Agent [baseline] (1.202 s) : 0, 1201701
Total [baseline] (10.931 s) : 0, 10931219
Agent [candidate] (1.198 s) : 0, 1197766
Total [candidate] (10.891 s) : 0, 10891485
gantt
title petclinic - break down per module: candidate=1.53.0-SNAPSHOT~aa9d3fae34, baseline=1.53.0-SNAPSHOT~030f9bbb36
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.491 ms) : 0, 1491
crashtracking [candidate] (1.462 ms) : 0, 1462
BytebuddyAgent [baseline] (748.035 ms) : 0, 748035
BytebuddyAgent [candidate] (735.637 ms) : 0, 735637
GlobalTracer [baseline] (246.227 ms) : 0, 246227
GlobalTracer [candidate] (243.561 ms) : 0, 243561
AppSec [baseline] (30.729 ms) : 0, 30729
AppSec [candidate] (30.131 ms) : 0, 30131
Debugger [baseline] (6.159 ms) : 0, 6159
Debugger [candidate] (6.075 ms) : 0, 6075
Remote Config [baseline] (702.65 µs) : 0, 703
Remote Config [candidate] (679.948 µs) : 0, 680
Telemetry [baseline] (13.363 ms) : 0, 13363
Telemetry [candidate] (12.301 ms) : 0, 12301
section appsec
crashtracking [baseline] (1.46 ms) : 0, 1460
crashtracking [candidate] (1.462 ms) : 0, 1462
BytebuddyAgent [baseline] (758.544 ms) : 0, 758544
BytebuddyAgent [candidate] (758.216 ms) : 0, 758216
GlobalTracer [baseline] (236.287 ms) : 0, 236287
GlobalTracer [candidate] (236.142 ms) : 0, 236142
AppSec [baseline] (170.037 ms) : 0, 170037
AppSec [candidate] (170.456 ms) : 0, 170456
Debugger [baseline] (5.792 ms) : 0, 5792
Debugger [candidate] (5.83 ms) : 0, 5830
Remote Config [baseline] (644.592 µs) : 0, 645
Remote Config [candidate] (651.217 µs) : 0, 651
Telemetry [baseline] (10.042 ms) : 0, 10042
Telemetry [candidate] (8.482 ms) : 0, 8482
IAST [baseline] (23.573 ms) : 0, 23573
IAST [candidate] (23.697 ms) : 0, 23697
section iast
crashtracking [baseline] (1.462 ms) : 0, 1462
crashtracking [candidate] (1.467 ms) : 0, 1467
BytebuddyAgent [baseline] (853.409 ms) : 0, 853409
BytebuddyAgent [candidate] (853.298 ms) : 0, 853298
GlobalTracer [baseline] (233.867 ms) : 0, 233867
GlobalTracer [candidate] (235.136 ms) : 0, 235136
AppSec [baseline] (25.754 ms) : 0, 25754
AppSec [candidate] (27.462 ms) : 0, 27462
Debugger [baseline] (5.788 ms) : 0, 5788
Debugger [candidate] (5.671 ms) : 0, 5671
Remote Config [baseline] (608.826 µs) : 0, 609
Remote Config [candidate] (597.226 µs) : 0, 597
Telemetry [baseline] (8.356 ms) : 0, 8356
Telemetry [candidate] (8.262 ms) : 0, 8262
IAST [baseline] (32.17 ms) : 0, 32170
IAST [candidate] (28.354 ms) : 0, 28354
section profiling
ProfilingAgent [baseline] (107.611 ms) : 0, 107611
ProfilingAgent [candidate] (107.05 ms) : 0, 107050
crashtracking [baseline] (1.438 ms) : 0, 1438
crashtracking [candidate] (1.445 ms) : 0, 1445
BytebuddyAgent [baseline] (765.337 ms) : 0, 765337
BytebuddyAgent [candidate] (762.141 ms) : 0, 762141
GlobalTracer [baseline] (223.515 ms) : 0, 223515
GlobalTracer [candidate] (223.323 ms) : 0, 223323
AppSec [baseline] (30.786 ms) : 0, 30786
AppSec [candidate] (29.899 ms) : 0, 29899
Debugger [baseline] (6.269 ms) : 0, 6269
Debugger [candidate] (6.252 ms) : 0, 6252
Remote Config [baseline] (721.201 µs) : 0, 721
Remote Config [candidate] (718.861 µs) : 0, 719
Telemetry [baseline] (15.431 ms) : 0, 15431
Telemetry [candidate] (16.501 ms) : 0, 16501
Profiling [baseline] (108.281 ms) : 0, 108281
Profiling [candidate] (107.695 ms) : 0, 107695
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.53.0-SNAPSHOT~aa9d3fae34, baseline=1.53.0-SNAPSHOT~030f9bbb36
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.047 s) : 0, 1046816
Total [baseline] (8.622 s) : 0, 8622478
Agent [candidate] (1.069 s) : 0, 1068720
Total [candidate] (8.66 s) : 0, 8660216
section iast
Agent [baseline] (1.182 s) : 0, 1181634
Total [baseline] (9.34 s) : 0, 9339597
Agent [candidate] (1.18 s) : 0, 1180044
Total [candidate] (9.335 s) : 0, 9334956
gantt
title insecure-bank - break down per module: candidate=1.53.0-SNAPSHOT~aa9d3fae34, baseline=1.53.0-SNAPSHOT~030f9bbb36
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.447 ms) : 0, 1447
crashtracking [candidate] (1.495 ms) : 0, 1495
BytebuddyAgent [baseline] (732.76 ms) : 0, 732760
BytebuddyAgent [candidate] (746.756 ms) : 0, 746756
GlobalTracer [baseline] (242.723 ms) : 0, 242723
GlobalTracer [candidate] (246.834 ms) : 0, 246834
AppSec [baseline] (30.04 ms) : 0, 30040
AppSec [candidate] (30.926 ms) : 0, 30926
Debugger [baseline] (6.06 ms) : 0, 6060
Debugger [candidate] (6.119 ms) : 0, 6119
Remote Config [baseline] (669.221 µs) : 0, 669
Remote Config [candidate] (680.907 µs) : 0, 681
Telemetry [baseline] (12.179 ms) : 0, 12179
Telemetry [candidate] (14.655 ms) : 0, 14655
section iast
crashtracking [baseline] (1.461 ms) : 0, 1461
crashtracking [candidate] (1.454 ms) : 0, 1454
BytebuddyAgent [baseline] (852.816 ms) : 0, 852816
BytebuddyAgent [candidate] (851.392 ms) : 0, 851392
GlobalTracer [baseline] (233.754 ms) : 0, 233754
GlobalTracer [candidate] (233.375 ms) : 0, 233375
IAST [baseline] (31.071 ms) : 0, 31071
IAST [candidate] (27.973 ms) : 0, 27973
AppSec [baseline] (26.883 ms) : 0, 26883
AppSec [candidate] (30.021 ms) : 0, 30021
Debugger [baseline] (5.772 ms) : 0, 5772
Debugger [candidate] (5.774 ms) : 0, 5774
Remote Config [baseline] (617.035 µs) : 0, 617
Remote Config [candidate] (619.876 µs) : 0, 620
Telemetry [baseline] (8.246 ms) : 0, 8246
Telemetry [candidate] (8.357 ms) : 0, 8357
LoadParameters
See matching parameters
SummaryFound 3 performance improvements and 1 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.53.0-SNAPSHOT~aa9d3fae34, baseline=1.53.0-SNAPSHOT~030f9bbb36
dateFormat X
axisFormat %s
section baseline
no_agent (36.178 ms) : 35890, 36467
. : milestone, 36178,
appsec (48.205 ms) : 47781, 48630
. : milestone, 48205,
code_origins (46.751 ms) : 46334, 47168
. : milestone, 46751,
iast (44.361 ms) : 43994, 44729
. : milestone, 44361,
profiling (50.417 ms) : 49930, 50903
. : milestone, 50417,
tracing (43.937 ms) : 43557, 44316
. : milestone, 43937,
section candidate
no_agent (38.359 ms) : 38056, 38662
. : milestone, 38359,
appsec (47.76 ms) : 47331, 48190
. : milestone, 47760,
code_origins (44.89 ms) : 44510, 45271
. : milestone, 44890,
iast (43.583 ms) : 43213, 43954
. : milestone, 43583,
profiling (48.35 ms) : 47916, 48784
. : milestone, 48350,
tracing (45.061 ms) : 44676, 45445
. : milestone, 45061,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~aa9d3fae34, baseline=1.53.0-SNAPSHOT~030f9bbb36
dateFormat X
axisFormat %s
section baseline
no_agent (4.368 ms) : 4318, 4419
. : milestone, 4368,
iast (9.445 ms) : 9288, 9602
. : milestone, 9445,
iast_FULL (14.086 ms) : 13805, 14366
. : milestone, 14086,
iast_GLOBAL (10.652 ms) : 10458, 10847
. : milestone, 10652,
profiling (8.829 ms) : 8682, 8976
. : milestone, 8829,
tracing (7.862 ms) : 7750, 7974
. : milestone, 7862,
section candidate
no_agent (4.373 ms) : 4316, 4429
. : milestone, 4373,
iast (9.564 ms) : 9407, 9721
. : milestone, 9564,
iast_FULL (13.956 ms) : 13679, 14233
. : milestone, 13956,
iast_GLOBAL (10.619 ms) : 10431, 10807
. : milestone, 10619,
profiling (8.972 ms) : 8828, 9116
. : milestone, 8972,
tracing (7.513 ms) : 7408, 7617
. : milestone, 7513,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~aa9d3fae34, baseline=1.53.0-SNAPSHOT~030f9bbb36
dateFormat X
axisFormat %s
section baseline
no_agent (14.868 s) : 14868000, 14868000
. : milestone, 14868000,
appsec (14.888 s) : 14888000, 14888000
. : milestone, 14888000,
iast (18.36 s) : 18360000, 18360000
. : milestone, 18360000,
iast_GLOBAL (18.199 s) : 18199000, 18199000
. : milestone, 18199000,
profiling (15.457 s) : 15457000, 15457000
. : milestone, 15457000,
tracing (14.8 s) : 14800000, 14800000
. : milestone, 14800000,
section candidate
no_agent (15.486 s) : 15486000, 15486000
. : milestone, 15486000,
appsec (14.827 s) : 14827000, 14827000
. : milestone, 14827000,
iast (18.215 s) : 18215000, 18215000
. : milestone, 18215000,
iast_GLOBAL (18.237 s) : 18237000, 18237000
. : milestone, 18237000,
profiling (15.53 s) : 15530000, 15530000
. : milestone, 15530000,
tracing (14.867 s) : 14867000, 14867000
. : milestone, 14867000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~aa9d3fae34, baseline=1.53.0-SNAPSHOT~030f9bbb36
dateFormat X
axisFormat %s
section baseline
no_agent (1.478 ms) : 1466, 1489
. : milestone, 1478,
appsec (3.659 ms) : 3440, 3878
. : milestone, 3659,
iast (2.205 ms) : 2142, 2267
. : milestone, 2205,
iast_GLOBAL (2.242 ms) : 2178, 2305
. : milestone, 2242,
profiling (2.051 ms) : 2000, 2102
. : milestone, 2051,
tracing (2.022 ms) : 1973, 2071
. : milestone, 2022,
section candidate
no_agent (1.473 ms) : 1461, 1484
. : milestone, 1473,
appsec (3.6 ms) : 3389, 3811
. : milestone, 3600,
iast (2.208 ms) : 2145, 2271
. : milestone, 2208,
iast_GLOBAL (2.25 ms) : 2186, 2314
. : milestone, 2250,
profiling (2.468 ms) : 2310, 2625
. : milestone, 2468,
tracing (2.029 ms) : 1979, 2078
. : milestone, 2029,
|
@@ -323,20 +317,26 @@ MetaWriter withWritable(Writable writable) { | |||
|
|||
@Override | |||
public void accept(Metadata metadata) { | |||
TagMap tags = metadata.getTags().copy(); |
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.
Can we try and estimate the overhead of this (with a test-environment run, for example)? Creating a copy of the tags map for every serialized span could be a big deal. I know there's an implementation of TagMap
that is optimized for copying, but it isn't used by default still.
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.
I wonder if it will be less overhead to skip the DEFAULT_TOP_LEVEL_TAGS
when iterating over the tag entries below.
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.
As discussed offline, I'll test the two implementations on test environment to see how it impacts performance 👍
What Does This Do
datadog.trace.civisibility.writer.ddintake.CiTestCycleMapperV1#map
idempotent by not removing the top level tagstest_session_id
,test_module_id
,test_suite_id
anditr_correlation_id
from the test span on mapping.Motivation
datadog.communication.serialization.msgpack.MsgPackWriter#format
, the mapping will be attempted again after flushing the buffer. Given that the test span was being modified inside the method, it meant that successive calls on the same span would yield different results. This materialized as test spans being sent to the backend without the ID tags.Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: SDTEST-2590