Skip to content

Conversation

@nikam14
Copy link
Contributor

@nikam14 nikam14 commented May 2, 2023

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

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

try {
if (!file.createNewFile()) {
s_logger.error("Unable to create _file: " + file.getAbsolutePath());
s_logger.error("Unable to create _file: ".concat(file.getAbsolutePath()));
Copy link
Member

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.

Copy link
Contributor Author

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 .

Copy link
Contributor

@DaanHoogland DaanHoogland left a 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
Copy link

codecov bot commented May 8, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (8b5bfb1) 12.72% compared to head (76666bb) 28.54%.
Report is 489 commits behind head on main.

Files Patch % Lines
...va/com/cloud/agent/dao/impl/PropertiesStorage.java 0.00% 4 Missing ⚠️
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     
Flag Coverage Δ
simulator-marvin-tests 24.30% <0.00%> (?)
uitests 4.49% <ø> (?)
unit-tests 14.81% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yadvr yadvr added this to the 4.19.0.0 milestone May 23, 2023
@yadvr
Copy link
Member

yadvr commented May 23, 2023

@blueorangutan package

@blueorangutan
Copy link

@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.

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6115

Copy link
Member

@soreana soreana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@soreana
Copy link
Member

soreana commented Sep 30, 2023

@blueorangutan package

@blueorangutan
Copy link

@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.

@soreana soreana closed this Oct 1, 2023
@soreana soreana reopened this Oct 1, 2023
@soreana
Copy link
Member

soreana commented Oct 1, 2023

@blueorangutan package

@blueorangutan
Copy link

@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.

@soreana
Copy link
Member

soreana commented Oct 1, 2023

@blueorangutan package

@blueorangutan
Copy link

@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
Copy link

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7183

@soreana
Copy link
Member

soreana commented Oct 2, 2023

@nikam14 Can you please address @GutoVeronezi 's comments?

@DaanHoogland DaanHoogland changed the title [MINOR][Enhancement] improved concatenation way in PropertiesStorage.java Improved concatenation way in PropertiesStorage.java Oct 3, 2023
@shwstppr
Copy link
Contributor

shwstppr commented Oct 5, 2023

@nikam14 can you please address outstanding review comments?

Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
@DaanHoogland
Copy link
Contributor

@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.

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@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.

Copy link
Contributor

@DaanHoogland DaanHoogland left a 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

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7584

@DaanHoogland
Copy link
Contributor

formatting log messages only, should be good if compiles

@DaanHoogland DaanHoogland merged commit cc45bff into apache:main Nov 16, 2023
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Nov 29, 2023
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants