Skip to content

Commit

Permalink
Print plotting progress in % during successful sector plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Aug 20, 2023
1 parent 7efb0bf commit e2a5c14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions crates/subspace-farmer/src/single_disk_farm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,7 @@ impl SingleDiskFarm {
erasure_coding,
handlers,
modifying_sector_index,
target_sector_count,
sectors_to_plot_receiver,
)
.await
Expand Down
7 changes: 6 additions & 1 deletion crates/subspace-farmer/src/single_disk_farm/plotting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ pub(super) async fn plotting<NC, PG, PosTable>(
erasure_coding: ErasureCoding,
handlers: Arc<Handlers>,
modifying_sector_index: Arc<RwLock<Option<SectorIndex>>>,
target_sector_count: u16,
mut sectors_to_plot: mpsc::Receiver<(SectorIndex, oneshot::Sender<()>)>,
) -> Result<(), PlottingError>
where
Expand Down Expand Up @@ -225,7 +226,11 @@ where
if maybe_old_plotted_sector.is_some() {
info!(%sector_index, "Sector replotted successfully");
} else {
info!(%sector_index, "Sector plotted successfully");
info!(
%sector_index,
"Sector plotted successfully ({:.2}%)",
(sector_index + 1) as f32 / target_sector_count as f32 * 100.0
);
}

handlers
Expand Down

0 comments on commit e2a5c14

Please sign in to comment.