package b0

  1. Overview
  2. Docs

B00.Memo log.

A B00.Memo log has all the build operations, the hashed file paths and a few global timings.

Logs

type t

The type for B00.Memo logs.

val of_memo : B00.Memo.t -> t

of_memo m is a log for memo m.

val hash_fun : t -> string

hash_fun is the identifier of the hash function that was used.

val file_hashes : t -> B00_std.Hash.t B00_std.Fpath.Map.t

file_hashes l has all the files that were hashed through the memo.

val hash_dur : t -> B00_std.Time.span

hash_dur l is the time span spent hashing.

val total_dur : t -> B00_std.Time.span

total_dur l is the time spanning from B00.Memo.create to of_memo.

val cpu_dur : t -> B00_std.Time.cpu_span

cpu_dur l is the CPU time spanning from B00.Memo.create to of_memo.

val jobs : t -> int

jobs l is the maximal number of concurent spawns given to the build operation executor.

val ops : t -> B000.Op.t list

ops l are the operations of the log.

IO

val bincode : t B00_std.Bincode.t

bincode is a binary codec for logs.

val write : B00_std.Fpath.t -> t -> (unit, string) result

write f l writes log l to file f.

val read : B00_std.Fpath.t -> (t, string) result

read f read a log from file f.

Log formatters

val pp_stats : hashed_size:bool -> Op.query -> t B00_std.Fmt.t

pp_stats sel formats statistics stored in the log using query to select operations that are part of the statistics. If hashed_size the sum of the size of the files in file_hashes is computed (this accesses the file system in a non-fatal way in case of errors).

type out_format = [
  1. | `Hashed_files
  2. | `Op_hashes
  3. | `Ops
  4. | `Path
  5. | `Stats
  6. | `Root_hashed_files
  7. | `Trace_event
]

The type for output format.

out formats a log on the given formatter. path is used when `Path is requested.

Command line interface

val out_format_cli : ?docs:string -> unit -> out_format Cmdliner.Term.t

out_format_cli ~docs () are mutually exclusive options to specify alternate output formats.

OCaml

Innovation. Community. Security.