Skip to main content

Module reporting

Module reporting 

Source
Expand description

Centralized, parallel-safe progress and terminal reporting.

ProgressReporter registers every project task under an exact parameter-derived TaskIdentity, assigns ordering from configuration, and becomes the sole human-facing terminal writer for its lifetime. Worker threads receive non-clone TaskProgress handles and synchronize absolute iteration from their authoritative scientific state.

Iteration updates use per-task atomics. One renderer thread polls them at a bounded frequency, so numerical workers never draw progress bars or contend on terminal locks. Interactive stderr receives a multi-progress display; redirected stderr receives stable lifecycle lines. Tests and embedding applications may retain tracking while selecting hidden output.

§Minimal parallel use

use scientific_workflow::prelude::*;

let project = ScientificProject::load("project-root")?;
let reporter = ProgressReporter::for_project(&project)
    .identify_tasks_by(["temperature", "seed"])
    .start()?;
let progress = reporter.start_task(&task, 0, Some(1_000))?;
progress.set_iteration(1_000)?;
progress.complete()?;
let summary = reporter.complete("scientific work completed")?;
assert!(summary.is_success());

Structs§

ProgressReporter
Central progress registry and exclusive human-facing terminal owner.
ProgressReporterBuilder
Builder for one process-wide progress-reporting session.
ProgressSummary
Immutable aggregate captured when centralized reporting ends.
TaskIdentity
Exact parameter-derived identity of one task.
TaskProgress
Non-clone task-local progress handle.

Enums§

ReportingError
Failure while configuring, updating, or finalizing progress reporting.
TaskStatus
Lifecycle status of one independently executing scientific task.