Skip to content

Several optimizations in the method formatDurationWords#1018

Open
fenik17 wants to merge 1 commit into
apache:masterfrom
fenik17:format_duration_words_optimize
Open

Several optimizations in the method formatDurationWords#1018
fenik17 wants to merge 1 commit into
apache:masterfrom
fenik17:format_duration_words_optimize

Conversation

@fenik17
Copy link
Copy Markdown
Contributor

@fenik17 fenik17 commented Jan 10, 2023

Several improvements in method DurationFormatUtils#formatDurationWords:

  • Removing a couple unreachable code paths.
  • Replacing replaceOnce to removeStart and removeEnd where it possible.
  • Saving information about removed parts to reduce scans of string.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 10, 2023

Codecov Report

❌ Patch coverage is 90.32258% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.04%. Comparing base (ac2062d) to head (fbe2076).
⚠️ Report is 2222 commits behind head on master.

Files with missing lines Patch % Lines
...apache/commons/lang3/time/DurationFormatUtils.java 90.32% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1018      +/-   ##
============================================
+ Coverage     92.03%   92.04%   +0.01%     
- Complexity     7429     7434       +5     
============================================
  Files           193      193              
  Lines         15672    15684      +12     
  Branches       2899     2904       +5     
============================================
+ Hits          14423    14436      +13     
+ Misses          676      675       -1     
  Partials        573      573              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants