Tezos_stdlib_unix.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 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
module Reporter : sig ... end
module Display : sig ... end
val progress_bar :
message:string ->
counter:[ `Bytes | `Bytes_speed | `Int ] ->
?update_interval:float ->
?color:Terminal.Color.t ->
?no_tty_quiet:bool ->
int ->
int line
progress_bar ~message ~counter ?update_interval ?color ?no_tty_quiet 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. When provided, update_interval = f
makes the progress bar update every f
seconds. If no_tty_quiet
is set to false, no message is displayed when the output is not a TTY (by default the message
is displayed instead of the progress bar).
val spinner : ?no_tty_quiet:bool -> string -> 'a line
spinner ?no_tty_quiet message
creates a spinner that can be used to indicate progress for an unknown quantity. See progress_bar
for the description of no_tty_quiet
.
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.
module Lwt : sig ... end