-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Improved concatenation way in PropertiesStorage.java #7486
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
| try { | ||
| if (!file.createNewFile()) { | ||
| s_logger.error("Unable to create _file: " + file.getAbsolutePath()); | ||
| s_logger.error("Unable to create _file: ".concat(file.getAbsolutePath())); |
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.
the preferred way would be to use String.format, the concatenation using + isn't any different from concat.
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.
thank you for your suggestion , I will change it .
DaanHoogland
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.
clgtm, but why these particular instances of the + operator, @nikam14 ? Are these particular detrimental to performance in your system as opposed to the rest of the logging happening?
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #7486 +/- ##
=============================================
+ Coverage 12.72% 28.54% +15.82%
- Complexity 8706 30290 +21584
=============================================
Files 2727 5192 +2465
Lines 256526 366145 +109619
Branches 39989 53530 +13541
=============================================
+ Hits 32636 104523 +71887
- Misses 219738 247199 +27461
- Partials 4152 14423 +10271
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
@blueorangutan package |
|
@rohityadavcloud a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6115 |
soreana
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.
LGTM
|
@blueorangutan package |
|
@soreana a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
@blueorangutan package |
|
@soreana a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
@blueorangutan package |
|
@soreana a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7183 |
agent/src/main/java/com/cloud/agent/dao/impl/PropertiesStorage.java
Outdated
Show resolved
Hide resolved
agent/src/main/java/com/cloud/agent/dao/impl/PropertiesStorage.java
Outdated
Show resolved
Hide resolved
|
@nikam14 Can you please address @GutoVeronezi 's comments? |
|
@nikam14 can you please address outstanding review comments? |
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
|
@nikam14 @GutoVeronezi , I've applied the rather trivial changes to move this forward, please publicaly shame me here or on email if that was just to brutal of me. |
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
DaanHoogland
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.
small improvement allowing operators to supress stacktraces
agent/src/main/java/com/cloud/agent/dao/impl/PropertiesStorage.java
Outdated
Show resolved
Hide resolved
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7584 |
agent/src/main/java/com/cloud/agent/dao/impl/PropertiesStorage.java
Outdated
Show resolved
Hide resolved
|
formatting log messages only, should be good if compiles |
Co-authored-by: dahn <daan.hoogland@gmail.com> Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
Description
This PR... changed the '+' operator for concatenation to .concat method for concatenation because '+' operator takes more time then .concat method.
[Optimisation].
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?