Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Conversation

@t511203
Copy link
Contributor

@t511203 t511203 commented Nov 29, 2021

Improve performance and readability by swapping the Math.floorMod() method for the % operator.

The only difference between the two should be when there are negative inputs, but that doesn't apply here as we'd always expect valid input to this function (i.e. the timestamp should also be positive).

Related Issue

@codecov-commenter
Copy link

Codecov Report

Merging #231 (1815aae) into develop (f91f89d) will increase coverage by 0.01%.
The diff coverage is 90.47%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #231      +/-   ##
=============================================
+ Coverage      81.13%   81.14%   +0.01%     
- Complexity      1534     1538       +4     
=============================================
  Files            185      185              
  Lines           4268     4281      +13     
  Branches         430      431       +1     
=============================================
+ Hits            3463     3474      +11     
- Misses           627      629       +2     
  Partials         178      178              
Impacted Files Coverage Δ
.../gchq/koryphe/iterable/EmptyCloseableIterator.java 0.00% <ø> (ø)
...a/uk/gov/gchq/koryphe/iterable/StreamIterable.java 57.14% <ø> (ø)
...a/uk/gov/gchq/koryphe/iterable/StreamIterator.java 47.05% <ø> (ø)
...in/java/uk/gov/gchq/koryphe/util/IterableUtil.java 71.52% <ø> (ø)
...a/uk/gov/gchq/koryphe/impl/function/ParseDate.java 80.76% <75.00%> (-1.46%) ⬇️
...c/main/java/uk/gov/gchq/koryphe/util/DateUtil.java 85.00% <100.00%> (+2.64%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d41e72...1815aae. Read the comment docs.

@t92549 t92549 merged commit 795ca2e into develop Nov 29, 2021
@t92549 t92549 deleted the gh-149-modulo branch November 29, 2021 18:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update ParseDate to work with input timestamps in microseconds

4 participants