Module Mavkit_smart_rollup_node.Progress_bar

Small wrapper around the Progress library to easily create progress bars for use in the rollup node.

include module type of Progress
module Color = Terminal.Color
module Duration : sig ... end
module Printer : sig ... end
module Units : sig ... end
module Line : sig ... end
module Multi : sig ... end
val counter : ?style:[ `ASCII | `Custom of Line.Bar_style.t | `UTF8 ] -> ?message:string -> ?pp:int64 Printer.t -> int64 -> int64 Line.t
module Config : sig ... end
val with_reporters : ?config:Config.t -> ('a, 'b) Multi.t -> 'a -> 'b
val interject_with : (unit -> 'a) -> 'a
val logs_reporter : ?pp_header:(Logs.level * string option) Fmt.t -> ?app:Stdlib.Format.formatter -> ?dst:Stdlib.Format.formatter -> unit -> Logs.reporter
val instrument_logs_reporter : Logs.reporter -> Logs.reporter
module Reporter : sig ... end
module Display : sig ... end

Simple wrappers for progress bars

type 'a line

The type of progress line information which can also be displayed on non tty outputs.

val progress_bar : message:string -> counter:[ `Bytes | `Int ] -> ?color:Terminal.Color.t -> int -> int line

progress_bar ~message ~counter ~color total creates a progress bar with a message of the specified color to count until total. If counter is `Bytes, the progress bar represents bytes amounts and if `Int, it counts integer units.

val spinner : message:string -> 'a line

spinner ~message creates a spinner that can be used to indicate progress for an unknown quantity.

val with_reporter : 'a line -> (('a -> unit) -> 'b) -> 'b

Same as Progress.with_reporter but for non tty outputs, only displays the message without animation.

Lwt compatible progress bars

module Lwt : sig ... end