mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-02-25 07:53:19 +00:00
adding log stmts
This commit is contained in:
parent
48600dd398
commit
00a0381ba2
@ -319,12 +319,11 @@ proc asyncEncode*(
|
||||
self: ErasureRef, blockSize, parityLen: int, blocks: seq[seq[byte]]
|
||||
): Future[?!seq[seq[byte]]] {.async: (raises: [CancelledError]).} =
|
||||
var threadPtr = ?ThreadSignalPtr.new().mapFailure()
|
||||
echo "In Async Encode"
|
||||
|
||||
defer:
|
||||
if threadPtr != nil:
|
||||
?threadPtr.close().mapFailure()
|
||||
threadPtr = nil
|
||||
echo "Out Async Encode"
|
||||
|
||||
## Create an ecode task with block data
|
||||
var task = EncodeTask(
|
||||
@ -484,12 +483,10 @@ proc asyncDecode*(
|
||||
): Future[?!seq[seq[byte]]] {.async: (raises: [CancelledError]).} =
|
||||
var threadPtr = ?ThreadSignalPtr.new().mapFailure()
|
||||
|
||||
echo "In Async Decode"
|
||||
defer:
|
||||
if threadPtr != nil:
|
||||
?threadPtr.close().mapFailure()
|
||||
threadPtr = nil
|
||||
echo "Out Async Decode"
|
||||
|
||||
## Create an decode task with block data
|
||||
var task = DecodeTask(
|
||||
|
||||
@ -179,6 +179,7 @@ suite "Erasure encode/decode":
|
||||
decoded = (await erasure.decode(encoded)).tryGet()
|
||||
|
||||
test "Should tolerate losing M (a.k.a row) contiguous data blocks":
|
||||
echo "Testing tolerance for losing M contiguous data blocks"
|
||||
const
|
||||
buffers = 20
|
||||
parity = 10
|
||||
@ -197,6 +198,7 @@ suite "Erasure encode/decode":
|
||||
check present.tryGet()
|
||||
|
||||
test "Should tolerate losing M (a.k.a row) contiguous parity blocks":
|
||||
echo "Testing tolerance for losing M contiguous parity blocks"
|
||||
const
|
||||
buffers = 20
|
||||
parity = 10
|
||||
@ -219,6 +221,7 @@ suite "Erasure encode/decode":
|
||||
check present.tryGet()
|
||||
|
||||
test "Handles edge case of 0 parity blocks":
|
||||
echo "Testing edge case of 0 parity blocks"
|
||||
const
|
||||
buffers = 20
|
||||
parity = 0
|
||||
@ -228,6 +231,7 @@ suite "Erasure encode/decode":
|
||||
discard (await erasure.decode(encoded)).tryGet()
|
||||
|
||||
test "Should concurrently encode/decode multiple datasets":
|
||||
echo "Testing concurrent encode/decode with multiple datasets"
|
||||
const iterations = 5
|
||||
|
||||
let
|
||||
@ -265,6 +269,7 @@ suite "Erasure encode/decode":
|
||||
decoded.blocksCount == encoded.originalBlocksCount
|
||||
|
||||
test "Should handle verifiable manifests":
|
||||
echo "Testing verifiable manifests"
|
||||
const
|
||||
buffers = 20
|
||||
parity = 10
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user