-
Notifications
You must be signed in to change notification settings - Fork 50
EC Policer #3557
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
EC Policer #3557
Conversation
cthulhu-rider
commented
Sep 2, 2025
- based on Refactor policy processing in Policer #3553
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3557 +/- ##
==========================================
+ Coverage 25.98% 26.24% +0.25%
==========================================
Files 660 661 +1
Lines 49738 49931 +193
==========================================
+ Hits 12926 13105 +179
- Misses 35775 35783 +8
- Partials 1037 1043 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6de9978 to
1fa868a
Compare
1fa868a to
e41fadd
Compare
carpawell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same way as in other PRs i am bothered with the number of TODOs without issues.
| } | ||
| } | ||
|
|
||
| func BenchmarkDB_ListWithCursor_Attributes(b *testing.B) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have some initial results? can be added to commit message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
absolute results without cmp are of little information. But OK, done
| // are missing, DecodePartInfoFromAttributes returns [PartInfo.RuleIndex] = -1 | ||
| // without error. | ||
| func DecodePartInfoFromAttributes(ruleIdxAttr, partIdxAttr string) (PartInfo, error) { | ||
| // TODO: sync with object GET server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when will it be done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in a separate issue
chicken and egg situation. I dont create issues before TODOs are reviewed, they can be not needed. Or they may also can disappear after PR updates. And i have no place to ref new issue to like code in main branch suggest doing it deferred |
82b2a6b to
49b8282
Compare
| } | ||
|
|
||
| // MaxLen returns max length in s. Returns 0 if s is empty. | ||
| func MaxLen(s []string) int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
len(slices.MaxFunc(s, func(a, b string) {return cmp.Compare(len(a), len(b))}))?
I'm really worried about growing islices package. Especially given that this function is used only once (at least in the first patch).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
len(slices.MaxFunc(s, func(a, b string) {return cmp.Compare(len(a), len(b))}))
at first I did so, and found it so inconvenient that I added MaxLen(). Such an obvious task cannot be solved by simple call to the stdlib. I can think of it as an internal implementation of a new func, but not a replacement
I'm really worried about growing
islicespackage.
sure everybody remember https://go.dev/wiki/SliceTricks before slices was added. Hope most of the islices will be in slices someday. Maybe I can even contribute to this
49b8282 to
d82e44c
Compare
``` goarch: amd64 pkg: github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase cpu: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz BenchmarkDB_ListWithCursor_Attributes/all_hit/total=100,count=1-8 1912 696490 ns/op 164035 B/op 3255 allocs/op BenchmarkDB_ListWithCursor_Attributes/all_hit/total=100,count=10-8 2887 472411 ns/op 78049 B/op 1293 allocs/op BenchmarkDB_ListWithCursor_Attributes/all_hit/total=100,count=50-8 2700 408998 ns/op 73585 B/op 1118 allocs/op BenchmarkDB_ListWithCursor_Attributes/all_hit/total=100,count=99-8 2985 441147 ns/op 88161 B/op 1117 allocs/op BenchmarkDB_ListWithCursor_Attributes/all_hit/total=100,count=100-8 2626 416300 ns/op 77473 B/op 1096 allocs/op BenchmarkDB_ListWithCursor_Attributes/all_hit/total=100,count=101-8 2922 397558 ns/op 77473 B/op 1096 allocs/op BenchmarkDB_ListWithCursor_Attributes/all_miss/total=100,count=1-8 1963 938079 ns/op 164035 B/op 3255 allocs/op BenchmarkDB_ListWithCursor_Attributes/all_miss/total=100,count=10-8 2371 471226 ns/op 78049 B/op 1293 allocs/op BenchmarkDB_ListWithCursor_Attributes/all_miss/total=100,count=50-8 2541 479950 ns/op 73585 B/op 1118 allocs/op BenchmarkDB_ListWithCursor_Attributes/all_miss/total=100,count=99-8 2384 474303 ns/op 88162 B/op 1117 allocs/op BenchmarkDB_ListWithCursor_Attributes/all_miss/total=100,count=100-8 2997 492313 ns/op 77473 B/op 1096 allocs/op BenchmarkDB_ListWithCursor_Attributes/all_miss/total=100,count=101-8 2582 491780 ns/op 77473 B/op 1096 allocs/op ``` Signed-off-by: Leonard Lyubich <[email protected]>
Follow cd3e5d3. This covers moving parts to more optimal nodes only. Recreation of missing parts is postponed for #3554. Closes #3420. Signed-off-by: Leonard Lyubich <[email protected]>
Signed-off-by: Leonard Lyubich <[email protected]>
d82e44c to
a759fff
Compare