f2811f8585
[ #602 ] metrics: Add blobovnicza items counter
...
Vulncheck / Vulncheck (pull_request) Successful in 1m29s
Build / Build Components (1.21) (pull_request) Successful in 3m23s
DCO action / DCO (pull_request) Successful in 3m50s
Tests and linters / Tests (1.21) (pull_request) Successful in 4m27s
Tests and linters / Lint (pull_request) Successful in 4m48s
Tests and linters / Tests (1.20) (pull_request) Successful in 5m6s
Tests and linters / Staticcheck (pull_request) Successful in 5m8s
Tests and linters / Tests with -race (pull_request) Successful in 5m38s
Build / Build Components (1.20) (pull_request) Successful in 7m46s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-08-18 13:01:27 +03:00
c4e1d8eb07
[ #602 ] node: Fix blobovnicza typos
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-08-18 11:14:10 +03:00
10e63537b2
[ #602 ] metrics: Rename blobovnicza size metric
...
`Size` is not size, but open db size.
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-08-17 19:17:35 +00:00
809e97626b
[ #602 ] blobovnicza: Fix size counter
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-08-17 19:17:35 +00:00
af608da952
[ #373 ] metrics: Add blobovnizca metrics
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-06-21 15:13:26 +03:00
028d4a8058
[ #373 ] blobovnicza: Add metrics
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-06-21 15:13:26 +03:00
4b768fd115
[ #381 ] *: Move to sync/atomic
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-05-23 08:18:01 +03:00
1f4061c0e2
[ #285 ] blobonicza: Optimize upperPowerOfTwo()
...
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/push/pre-commit Pipeline was successful
The real reason is this:
```
pkg/local_object_storage/blobovnicza/sizes.go:36:69
revive empty-block: this block is empty, you can remove it
```
Didn't want to make this function longer or to add `nolint`, thus this
change. To justify:
```
UpperBound/size=1-8 0.4924n ± 1% 0.2472n ± 2% -49.80% (p=0.000 n=10)
UpperBound/size=1023-8 0.4936n ± 3% 0.2442n ± 1% -50.52% (p=0.000 n=10)
UpperBound/size=66560-8 0.8201n ± 2% 0.2436n ± 1% -70.29% (p=0.000 n=10)
UpperBound/size=41943040-8 6.6900n ± 5% 0.2432n ± 0% -96.36% (p=0.000 n=10)
geomean 1.075n 0.2446n -77.24%
```
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-26 17:35:11 +03:00
Evgenii Stratonikov
651adf46c6
[ #1094 ] blobovnicza: calculate size in Init
properly
...
If pre-existing blobovnicza is initialized, it's size should be updated
even if all buckets are in place.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-31 12:36:40 +03:00
Leonard Lyubich
90fd883e32
[ #915 ] blobovnicza: Use mean bucket size multiplier instead of min
...
For fullness estimation of `Blobovnicza` we use number of object stored
in each size bucket. In previous implementation we multiplied the number
by the difference in bucket boundaries. This expression rather
estimated the minimum volume (and for the smallest bucket, the maximum)
of objects in the bucket.
Multiply number of objects by mean bucket size.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-12-08 14:24:49 +03:00
Leonard Lyubich
2920c5203b
[ #915 ] blobovnicza: Re-use Bolt transaction in syncFullnessCounter
...
Make `syncFullnessCounter` to accept `bbolt.Tx` argument of Bolt
transaction within which counter should be synchronized. Pass
corresponding transaction during `Init`.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-12-08 14:24:49 +03:00
Leonard Lyubich
cc81723b01
[ #615 ] blobovnicza: Simplify byte size stringer
...
Make `stringifyByteSize` to return number of bytes as string.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-16 12:14:04 +03:00
Evgenii Stratonikov
71b87155ef
[ #521 ] *: use stdlib errors
package
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-05-19 16:42:54 +03:00
Leonard Lyubich
91bea44a1a
[ #245 ] blobovnicza: Fix initializing dimensional buckets
...
In previous implementation Blobovnicza could incorrectly initialize
dimensional buckets: if SmallSizeLimit = 2 ^ X + Y && Y < 2 ^ X, then
largest dimensional bucket was [2 ^ (X - 1) : 2 ^ X]. This was caused by an
incorrect condition for stopping the iterator along the dimensional
boundaries.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-14 12:48:59 +03:00
Leonard Lyubich
07e998d846
[ #216 ] blobovnicza: Implement main methods and logic
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-11 17:19:37 +03:00