-
Notifications
You must be signed in to change notification settings - Fork 323
Add testcase source file attribute to JUnit XML reports #8218
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
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 58 metrics, 5 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.46.0-SNAPSHOT~d44139d825, baseline=1.46.0-SNAPSHOT~d5592c6cbe
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1056302
Total [baseline] (10.412 s) : 0, 10411573
Agent [candidate] (1.057 s) : 0, 1056829
Total [candidate] (10.468 s) : 0, 10468033
section appsec
Agent [baseline] (1.19 s) : 0, 1189859
Total [baseline] (10.687 s) : 0, 10687321
Agent [candidate] (1.189 s) : 0, 1189402
Total [candidate] (10.679 s) : 0, 10679041
section iast
Agent [baseline] (1.201 s) : 0, 1200537
Total [baseline] (10.992 s) : 0, 10991880
Agent [candidate] (1.187 s) : 0, 1187308
Total [candidate] (11.023 s) : 0, 11022592
section profiling
Agent [baseline] (1.264 s) : 0, 1263963
Total [baseline] (10.805 s) : 0, 10805242
Agent [candidate] (1.255 s) : 0, 1255340
Total [candidate] (10.802 s) : 0, 10802075
gantt
title petclinic - break down per module: candidate=1.46.0-SNAPSHOT~d44139d825, baseline=1.46.0-SNAPSHOT~d5592c6cbe
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (714.366 ms) : 0, 714366
BytebuddyAgent [candidate] (715.165 ms) : 0, 715165
GlobalTracer [baseline] (255.888 ms) : 0, 255888
GlobalTracer [candidate] (255.592 ms) : 0, 255592
AppSec [baseline] (55.357 ms) : 0, 55357
AppSec [candidate] (56.853 ms) : 0, 56853
Remote Config [baseline] (743.666 µs) : 0, 744
Remote Config [candidate] (727.316 µs) : 0, 727
Telemetry [baseline] (14.944 ms) : 0, 14944
Telemetry [candidate] (13.42 ms) : 0, 13420
section appsec
BytebuddyAgent [baseline] (731.661 ms) : 0, 731661
BytebuddyAgent [candidate] (731.83 ms) : 0, 731830
GlobalTracer [baseline] (253.279 ms) : 0, 253279
GlobalTracer [candidate] (253.062 ms) : 0, 253062
AppSec [baseline] (171.414 ms) : 0, 171414
AppSec [candidate] (170.587 ms) : 0, 170587
Remote Config [baseline] (670.723 µs) : 0, 671
Remote Config [candidate] (659.391 µs) : 0, 659
Telemetry [baseline] (8.217 ms) : 0, 8217
Telemetry [candidate] (8.155 ms) : 0, 8155
IAST [baseline] (19.277 ms) : 0, 19277
IAST [candidate] (20.084 ms) : 0, 20084
section iast
BytebuddyAgent [baseline] (845.331 ms) : 0, 845331
BytebuddyAgent [candidate] (835.234 ms) : 0, 835234
GlobalTracer [baseline] (249.545 ms) : 0, 249545
GlobalTracer [candidate] (247.633 ms) : 0, 247633
AppSec [baseline] (58.7 ms) : 0, 58700
AppSec [candidate] (58.228 ms) : 0, 58228
Remote Config [baseline] (674.589 µs) : 0, 675
Remote Config [candidate] (673.197 µs) : 0, 673
Telemetry [baseline] (8.922 ms) : 0, 8922
Telemetry [candidate] (8.854 ms) : 0, 8854
IAST [baseline] (21.996 ms) : 0, 21996
IAST [candidate] (21.622 ms) : 0, 21622
section profiling
BytebuddyAgent [baseline] (709.216 ms) : 0, 709216
BytebuddyAgent [candidate] (704.729 ms) : 0, 704729
GlobalTracer [baseline] (351.402 ms) : 0, 351402
GlobalTracer [candidate] (350.372 ms) : 0, 350372
AppSec [baseline] (55.247 ms) : 0, 55247
AppSec [candidate] (53.942 ms) : 0, 53942
Remote Config [baseline] (720.415 µs) : 0, 720
Remote Config [candidate] (718.062 µs) : 0, 718
Telemetry [baseline] (8.854 ms) : 0, 8854
Telemetry [candidate] (8.742 ms) : 0, 8742
ProfilingAgent [baseline] (96.119 ms) : 0, 96119
ProfilingAgent [candidate] (94.718 ms) : 0, 94718
Profiling [baseline] (96.143 ms) : 0, 96143
Profiling [candidate] (94.743 ms) : 0, 94743
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.46.0-SNAPSHOT~d44139d825, baseline=1.46.0-SNAPSHOT~d5592c6cbe
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1056692
Total [baseline] (8.657 s) : 0, 8657333
Agent [candidate] (1.064 s) : 0, 1063790
Total [candidate] (8.638 s) : 0, 8638422
section iast
Agent [baseline] (1.184 s) : 0, 1184236
Total [baseline] (9.183 s) : 0, 9182938
Agent [candidate] (1.187 s) : 0, 1186588
Total [candidate] (9.206 s) : 0, 9205707
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.184 s) : 0, 1184322
Total [baseline] (9.192 s) : 0, 9191824
Agent [candidate] (1.199 s) : 0, 1198834
Total [candidate] (9.193 s) : 0, 9193084
section iast_TELEMETRY_OFF
Agent [baseline] (1.188 s) : 0, 1187740
Total [baseline] (9.227 s) : 0, 9227418
Agent [candidate] (1.182 s) : 0, 1181951
Total [candidate] (9.197 s) : 0, 9196538
gantt
title insecure-bank - break down per module: candidate=1.46.0-SNAPSHOT~d44139d825, baseline=1.46.0-SNAPSHOT~d5592c6cbe
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (714.848 ms) : 0, 714848
BytebuddyAgent [candidate] (720.924 ms) : 0, 720924
GlobalTracer [baseline] (255.741 ms) : 0, 255741
GlobalTracer [candidate] (258.165 ms) : 0, 258165
AppSec [baseline] (55.527 ms) : 0, 55527
AppSec [candidate] (55.823 ms) : 0, 55823
Remote Config [baseline] (730.913 µs) : 0, 731
Remote Config [candidate] (749.662 µs) : 0, 750
Telemetry [baseline] (14.788 ms) : 0, 14788
Telemetry [candidate] (12.965 ms) : 0, 12965
section iast
BytebuddyAgent [baseline] (833.163 ms) : 0, 833163
BytebuddyAgent [candidate] (835.089 ms) : 0, 835089
GlobalTracer [baseline] (246.761 ms) : 0, 246761
GlobalTracer [candidate] (247.474 ms) : 0, 247474
AppSec [baseline] (58.261 ms) : 0, 58261
AppSec [candidate] (58.017 ms) : 0, 58017
Remote Config [baseline] (663.887 µs) : 0, 664
Remote Config [candidate] (661.529 µs) : 0, 662
Telemetry [baseline] (8.759 ms) : 0, 8759
Telemetry [candidate] (8.806 ms) : 0, 8806
IAST [baseline] (21.582 ms) : 0, 21582
IAST [candidate] (21.49 ms) : 0, 21490
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (833.25 ms) : 0, 833250
BytebuddyAgent [candidate] (842.428 ms) : 0, 842428
GlobalTracer [baseline] (247.089 ms) : 0, 247089
GlobalTracer [candidate] (250.562 ms) : 0, 250562
AppSec [baseline] (58.037 ms) : 0, 58037
AppSec [candidate] (58.732 ms) : 0, 58732
Remote Config [baseline] (662.506 µs) : 0, 663
Remote Config [candidate] (698.206 µs) : 0, 698
Telemetry [baseline] (8.774 ms) : 0, 8774
Telemetry [candidate] (9.016 ms) : 0, 9016
IAST [baseline] (21.511 ms) : 0, 21511
IAST [candidate] (22.055 ms) : 0, 22055
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (835.758 ms) : 0, 835758
BytebuddyAgent [candidate] (831.018 ms) : 0, 831018
GlobalTracer [baseline] (248.176 ms) : 0, 248176
GlobalTracer [candidate] (247.579 ms) : 0, 247579
AppSec [baseline] (58.246 ms) : 0, 58246
AppSec [candidate] (58.063 ms) : 0, 58063
Remote Config [baseline] (653.692 µs) : 0, 654
Remote Config [candidate] (660.555 µs) : 0, 661
Telemetry [baseline] (8.688 ms) : 0, 8688
Telemetry [candidate] (8.645 ms) : 0, 8645
IAST [baseline] (21.039 ms) : 0, 21039
IAST [candidate] (20.92 ms) : 0, 20920
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 13 metrics, 15 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~d44139d825, baseline=1.46.0-SNAPSHOT~d5592c6cbe
dateFormat X
axisFormat %s
section baseline
no_agent (385.424 µs) : 366, 405
. : milestone, 385,
iast (513.184 µs) : 491, 535
. : milestone, 513,
iast_FULL (751.907 µs) : 730, 774
. : milestone, 752,
iast_GLOBAL (562.121 µs) : 540, 585
. : milestone, 562,
iast_HARDCODED_SECRET_DISABLED (508.595 µs) : 486, 531
. : milestone, 509,
iast_INACTIVE (462.75 µs) : 441, 484
. : milestone, 463,
iast_TELEMETRY_OFF (497.641 µs) : 476, 520
. : milestone, 498,
tracing (455.535 µs) : 434, 477
. : milestone, 456,
section candidate
no_agent (385.56 µs) : 365, 406
. : milestone, 386,
iast (517.713 µs) : 495, 540
. : milestone, 518,
iast_FULL (748.823 µs) : 727, 771
. : milestone, 749,
iast_GLOBAL (557.245 µs) : 535, 579
. : milestone, 557,
iast_HARDCODED_SECRET_DISABLED (509.975 µs) : 488, 532
. : milestone, 510,
iast_INACTIVE (462.895 µs) : 442, 484
. : milestone, 463,
iast_TELEMETRY_OFF (499.803 µs) : 478, 522
. : milestone, 500,
tracing (455.522 µs) : 435, 476
. : milestone, 456,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~d44139d825, baseline=1.46.0-SNAPSHOT~d5592c6cbe
dateFormat X
axisFormat %s
section baseline
no_agent (1.37 ms) : 1349, 1391
. : milestone, 1370,
appsec (1.758 ms) : 1734, 1782
. : milestone, 1758,
appsec_no_iast (1.76 ms) : 1736, 1784
. : milestone, 1760,
iast (1.534 ms) : 1510, 1558
. : milestone, 1534,
profiling (1.537 ms) : 1513, 1561
. : milestone, 1537,
tracing (1.487 ms) : 1462, 1512
. : milestone, 1487,
section candidate
no_agent (1.371 ms) : 1350, 1391
. : milestone, 1371,
appsec (1.761 ms) : 1736, 1785
. : milestone, 1761,
appsec_no_iast (1.777 ms) : 1752, 1802
. : milestone, 1777,
iast (1.501 ms) : 1476, 1526
. : milestone, 1501,
profiling (1.532 ms) : 1507, 1558
. : milestone, 1532,
tracing (1.522 ms) : 1497, 1546
. : milestone, 1522,
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 tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.46.0-SNAPSHOT~d44139d825, baseline=1.46.0-SNAPSHOT~d5592c6cbe
dateFormat X
axisFormat %s
section baseline
no_agent (1.469 ms) : 1457, 1480
. : milestone, 1469,
appsec (2.369 ms) : 2326, 2412
. : milestone, 2369,
iast (2.113 ms) : 2058, 2167
. : milestone, 2113,
iast_GLOBAL (2.155 ms) : 2100, 2210
. : milestone, 2155,
profiling (2.473 ms) : 2286, 2659
. : milestone, 2473,
tracing (1.947 ms) : 1905, 1989
. : milestone, 1947,
section candidate
no_agent (1.475 ms) : 1463, 1486
. : milestone, 1475,
appsec (2.377 ms) : 2334, 2420
. : milestone, 2377,
iast (2.108 ms) : 2053, 2163
. : milestone, 2108,
iast_GLOBAL (2.158 ms) : 2103, 2213
. : milestone, 2158,
profiling (1.985 ms) : 1940, 2030
. : milestone, 1985,
tracing (1.946 ms) : 1904, 1988
. : milestone, 1946,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.46.0-SNAPSHOT~d44139d825, baseline=1.46.0-SNAPSHOT~d5592c6cbe
dateFormat X
axisFormat %s
section baseline
no_agent (15.295 s) : 15295000, 15295000
. : milestone, 15295000,
appsec (14.966 s) : 14966000, 14966000
. : milestone, 14966000,
iast (18.961 s) : 18961000, 18961000
. : milestone, 18961000,
iast_GLOBAL (17.851 s) : 17851000, 17851000
. : milestone, 17851000,
profiling (15.786 s) : 15786000, 15786000
. : milestone, 15786000,
tracing (14.873 s) : 14873000, 14873000
. : milestone, 14873000,
section candidate
no_agent (15.096 s) : 15096000, 15096000
. : milestone, 15096000,
appsec (15.045 s) : 15045000, 15045000
. : milestone, 15045000,
iast (18.401 s) : 18401000, 18401000
. : milestone, 18401000,
iast_GLOBAL (17.797 s) : 17797000, 17797000
. : milestone, 17797000,
profiling (15.06 s) : 15060000, 15060000
. : milestone, 15060000,
tracing (14.881 s) : 14881000, 14881000
. : milestone, 14881000,
|
25c7e90 to
852f59e
Compare
22d8346 to
a44012d
Compare
| function get_source_file () { | ||
| file_path="${RESULT_XML_FILE%%"/build"*}" | ||
| file_path="${file_path/#"$WORKSPACE_DIR"\//}/src" | ||
| if ! [[ $RESULT_XML_FILE == *"#"* ]]; then |
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.
If the XML file has "#" in the path, then the file name corresponds to the testcase name. In this case I left the source file as the src parent directory of the file that the test case was run from.
| cp "$RESULT_XML_FILE" "$TEST_RESULTS_DIR/$AGGREGATED_FILE_NAME" | ||
| # Insert file attribute to testcase XML nodes | ||
| get_source_file | ||
| sed -i "/<testcase/ s|\(time=\"[^\"]*\"\)|\1 file=\"$file_path\"|g" "$TEST_RESULTS_DIR/$AGGREGATED_FILE_NAME" |
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.
This assumes that all testcases in the same XML result come from the same source file.
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
a44012d to
f11fbf3
Compare
PerfectSlayer
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.
Looks good as is. Let's give it a try and refine it if needed 👍
… their file name.
f11fbf3 to
d44139d
Compare
What Does This Do
This PR post-processes the XML results in
collect_results.shby backfilling source file information based on the XML report path and test class name.If the result XML file is named after a specific test case, it sets the file attribute to the
srcdirectory that the test case was run from. Otherwise, we usegrepto find the class file in thissrcdirectory and set the file attribute to the common path of the result(s).Motivation
The goal of this PR is to add the source file attribute to the testcase nodes of the JUnit XML results. This will eventually allow us to assign codeowner data (see here) and log the test case source file for troubleshooting.
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any usefull labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: https://datadoghq.atlassian.net/browse/LANGPLAT-147