-
Notifications
You must be signed in to change notification settings - Fork 293
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
Replace StringBuilder#append(String) with StringBuilder#append(char) #8008
Conversation
Debugger benchmarksParameters
See matching parameters
SummaryFound 5 performance improvements and 0 performance regressions! Performance is the same for 3 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 (326.122 µs) : 249, 403
. : milestone, 326,
basic (311.992 µs) : 296, 328
. : milestone, 312,
loop (11.072 ms) : 11034, 11110
. : milestone, 11072,
section candidate
noprobe (305.4 µs) : 282, 329
. : milestone, 305,
basic (317.267 µs) : 309, 325
. : milestone, 317,
loop (10.352 ms) : 10327, 10377
. : milestone, 10352,
|
BenchmarksStartupLoadDacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.44.0-SNAPSHOT~7d452a8e9a, baseline=1.43.0-SNAPSHOT~f2d21ae588
dateFormat X
axisFormat %s
section baseline
no_agent (14.942 s) : 14942000, 14942000
. : milestone, 14942000,
appsec (15.077 s) : 15077000, 15077000
. : milestone, 15077000,
iast (18.604 s) : 18604000, 18604000
. : milestone, 18604000,
iast_GLOBAL (17.737 s) : 17737000, 17737000
. : milestone, 17737000,
profiling (15.099 s) : 15099000, 15099000
. : milestone, 15099000,
tracing (15.131 s) : 15131000, 15131000
. : milestone, 15131000,
section candidate
no_agent (14.928 s) : 14928000, 14928000
. : milestone, 14928000,
appsec (15.063 s) : 15063000, 15063000
. : milestone, 15063000,
iast (18.723 s) : 18723000, 18723000
. : milestone, 18723000,
iast_GLOBAL (18.252 s) : 18252000, 18252000
. : milestone, 18252000,
profiling (14.935 s) : 14935000, 14935000
. : milestone, 14935000,
tracing (14.844 s) : 14844000, 14844000
. : milestone, 14844000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.44.0-SNAPSHOT~7d452a8e9a, baseline=1.43.0-SNAPSHOT~f2d21ae588
dateFormat X
axisFormat %s
section baseline
no_agent (1.469 ms) : 1457, 1480
. : milestone, 1469,
appsec (2.341 ms) : 2299, 2383
. : milestone, 2341,
iast (2.092 ms) : 2039, 2145
. : milestone, 2092,
iast_GLOBAL (2.136 ms) : 2083, 2189
. : milestone, 2136,
profiling (1.956 ms) : 1914, 1999
. : milestone, 1956,
tracing (1.927 ms) : 1887, 1968
. : milestone, 1927,
section candidate
no_agent (1.473 ms) : 1462, 1485
. : milestone, 1473,
appsec (2.35 ms) : 2308, 2392
. : milestone, 2350,
iast (2.088 ms) : 2035, 2141
. : milestone, 2088,
iast_GLOBAL (2.133 ms) : 2079, 2186
. : milestone, 2133,
profiling (1.941 ms) : 1899, 1983
. : milestone, 1941,
tracing (1.929 ms) : 1889, 1970
. : milestone, 1929,
|
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 hope you used a tool to make all the changes 😅
@PerfectSlayer Sure, just used Anyway, the debugger benchmarks will need to be checked, these results are weird. |
...t/instrumentation/testng/src/main/java/datadog/trace/instrumentation/testng/TestNGUtils.java
Outdated
Show resolved
Hide resolved
5a15ca9
to
0fcd18e
Compare
The rule is kind of useless. even if append on char is marginally faster that string, before make it noticeable you need a very critical million iterations to see a difference, and most of the time on a constant. |
Ack. I'll merge this as a one-off, since they won't be harmful anyway. |
What Does This Do
Replace
StringBuilder#append(String)
withStringBuilder#append(char)
when a single character is used.Motivation
Detected with java-best-practices/sb-append-char static analysis rule.
Additional Notes
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: [PROJ-IDENT]