pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[improve][ml] Optimization method getNumberOfEntries

Open hanmz opened this issue 1 year ago • 8 comments

Motivation

Currently, when readPosition== lastPosition‘next, getNumberOfEntries will be entered. However, this is meaningless and may affect performance.

For example, readPosition=3:0, lastPosition=3:-1, will enter the getNumberOfEntries method image

Modifications

When readPosition is greater than lastPosition, return 0 directly.

Documentation

  • [ ] doc
  • [ ] doc-required
  • [x] doc-not-needed
  • [ ] doc-complete

hanmz avatar Nov 07 '24 10:11 hanmz

/pulsarbot rerun-failure-checks

nodece avatar Nov 07 '24 15:11 nodece

/pulsarbot rerun-failure-checks

hanmz avatar Dec 09 '24 07:12 hanmz

/pulsarbot rerun-failure-checks

nodece avatar Dec 13 '24 04:12 nodece

close & reopen to trigger CI

Jason918 avatar Dec 16 '24 11:12 Jason918

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 75.49%. Comparing base (bbc6224) to head (815e3b5). Report is 794 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23576      +/-   ##
============================================
+ Coverage     73.57%   75.49%   +1.91%     
- Complexity    32624    37348    +4724     
============================================
  Files          1877     1946      +69     
  Lines        139502   155026   +15524     
  Branches      15299    17834    +2535     
============================================
+ Hits         102638   117030   +14392     
- Misses        28908    29383     +475     
- Partials       7956     8613     +657     
Flag Coverage Δ
inttests 27.35% <100.00%> (+2.76%) :arrow_up:
systests 24.38% <100.00%> (+0.05%) :arrow_up:
unittests 74.92% <100.00%> (+2.08%) :arrow_up:

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

Files with missing lines Coverage Δ
...che/bookkeeper/mledger/impl/ManagedCursorImpl.java 82.08% <100.00%> (+2.78%) :arrow_up:

... and 673 files with indirect coverage changes

codecov-commenter avatar Dec 16 '24 11:12 codecov-commenter

@hanmz Please rebase master branch.

nodece avatar Dec 17 '24 08:12 nodece

reopen to trigger CI

hanmz avatar Feb 12 '25 04:02 hanmz

@hanmz Please rebase master branch.

Done, please help me review again

hanmz avatar Feb 12 '25 04:02 hanmz