-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][ml] Optimization method getNumberOfEntries #23576
base: master
Are you sure you want to change the base?
Conversation
/pulsarbot rerun-failure-checks |
/pulsarbot rerun-failure-checks |
/pulsarbot rerun-failure-checks |
close & reopen to trigger CI |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@hanmz Please rebase master branch. |
9093593
to
decc815
Compare
reopen to trigger CI |
Done, please help me review again |
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](https://private-user-images.githubusercontent.com/16524922/383914944-ab973a2b-a137-45f6-bebc-27fff1aa51bb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjEzMjEsIm5iZiI6MTczOTM2MTAyMSwicGF0aCI6Ii8xNjUyNDkyMi8zODM5MTQ5NDQtYWI5NzNhMmItYTEzNy00NWY2LWJlYmMtMjdmZmYxYWE1MWJiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDExNTAyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFjMjliN2FiZGU1Njc2ZWJiNjBiMzgxZTUwMjQxYTg1ZjI1NzgyZDUzZDY4NDgyZjQyOTA4ZGU4YzE4NDRmYjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.KQifWMwQBHoJtTneZmNCyUPbqBWycLfwjdnLu0o4Ld0)
Modifications
When
readPosition
is greater thanlastPosition
, return 0 directly.Documentation
doc
doc-required
doc-not-needed
doc-complete