added timer for parallel reconstruction
This commit is contained in:
parent
62019442f3
commit
a8a9c9a728
|
@ -10,6 +10,7 @@
|
||||||
# Uncategorized helper functions from the spec
|
# Uncategorized helper functions from the spec
|
||||||
import
|
import
|
||||||
taskpools,
|
taskpools,
|
||||||
|
chronos,
|
||||||
std/[algorithm, macros, tables, cpuinfo],
|
std/[algorithm, macros, tables, cpuinfo],
|
||||||
stew/results,
|
stew/results,
|
||||||
ssz_serialization/[
|
ssz_serialization/[
|
||||||
|
@ -195,6 +196,7 @@ proc recover_cells_and_proofs_parallel*(
|
||||||
data_columns: seq[DataColumnSidecar]):
|
data_columns: seq[DataColumnSidecar]):
|
||||||
Result[seq[CellsAndProofs], cstring] =
|
Result[seq[CellsAndProofs], cstring] =
|
||||||
|
|
||||||
|
let start = Moment.now()
|
||||||
# This helper recovers blobs from the data column sidecars
|
# This helper recovers blobs from the data column sidecars
|
||||||
if not (data_columns.len != 0):
|
if not (data_columns.len != 0):
|
||||||
return err("DataColumnSidecar: Length should not be 0")
|
return err("DataColumnSidecar: Length should not be 0")
|
||||||
|
@ -220,6 +222,8 @@ proc recover_cells_and_proofs_parallel*(
|
||||||
if res.isOk:
|
if res.isOk:
|
||||||
recovered_cps.add(result.get)
|
recovered_cps.add(result.get)
|
||||||
|
|
||||||
|
let finish = Moment.now()
|
||||||
|
debug "Time taken to reconstruct in parallel", time = finish - start
|
||||||
ok(recovered_cps)
|
ok(recovered_cps)
|
||||||
|
|
||||||
proc parallelColumnReconstruction*(
|
proc parallelColumnReconstruction*(
|
||||||
|
|
Loading…
Reference in New Issue