storj/testsuite/storjscan
Michal Niewrzal 16b7901fde satellite/metabase: add piece size calculation to segment
This code is essentially replacement for eestream.CalcPieceSize. To call
eestream.CalcPieceSize we need eestream.RedundancyStrategy which is not
trivial to get as it requires infectious.FEC. For example infectious.FEC
creation is visible on GE loop observer CPU profile because we were
doing this for each segment in DB.

New method was added to storj.Redundancy and here we are just wiring it
with metabase Segment.

BenchmarkSegmentPieceSize
BenchmarkSegmentPieceSize/eestream.CalcPieceSize
BenchmarkSegmentPieceSize/eestream.CalcPieceSize-8         	    5822	    189189 ns/op	    9776 B/op	       8 allocs/op
BenchmarkSegmentPieceSize/segment.PieceSize
BenchmarkSegmentPieceSize/segment.PieceSize-8              	94721329	        11.49 ns/op	       0 B/op	       0 allocs/op

Change-Id: I5a8b4237aedd1424c54ed0af448061a236b00295
2023-02-22 11:04:02 +00:00
..
storjscantest all: fix math/rand deprecations 2023-02-17 15:05:54 +02:00
backfill_test.go testsuite/storjscan: add backfill payments test 2022-10-04 18:56:48 +00:00
chore_test.go satellite/payments/storjscan: use currency.Ammount for token and usd values 2022-09-14 15:15:26 +02:00
client_test.go satellite/payments/storjscan: use currency.Ammount for token and usd values 2022-09-14 15:15:26 +02:00
go.mod satellite/metabase: add piece size calculation to segment 2023-02-22 11:04:02 +00:00
go.sum satellite/metabase: add piece size calculation to segment 2023-02-22 11:04:02 +00:00