package octez-l2-libs

  1. Overview
  2. Docs

Defines a type scenario and its constructors, how to run it on the PVM

type 'a run_state
type 'a action = 'a run_state -> 'a run_state Lwt.t
type scenario_step

step in a scenario, associates an action to a label

type scenario

all informations needed to run a benchmark scenario

val make_scenario_step : string -> Pvm_instance.Wasm.tree action -> scenario_step

make_scenario_step step_name action creates a scenario_step (1 action)

val make_scenario : string -> string -> scenario_step list -> scenario

make_scenario scenario_name kernel_path actions creates a scenario with

  • a scenario_name
  • the kernel stored at kernel_path
  • a list of actions
val ignore_scenario : scenario -> scenario

ignore_scenario scenario returns a scenario that will be ignored during a run. Can be used to reproduce part of run, ignoring some parts without having to delete anything.

action corresponding to a top level call of PVM, in slow mode, including reboots if necessary.

action corresponding to a top level call of PVM, using fast execution, including reboots if necessary.

val load_messages : int32 -> Exec.message list -> Pvm_instance.Wasm.tree action

load_messages level messages returns the action corresponding to adding a list of messages in the inbox at a given level.

val apply_step : ?verbose:bool -> ?totals:bool -> ?irmin:bool -> scenario_step -> Pvm_instance.Wasm.tree -> (Data.benchmark * Pvm_instance.Wasm.tree) Lwt.t

apply_step step tree evaluate a scenario step on a given tree, returning the collected benchmark data and the new state as a tree.

val run_scenarios : ?verbose:bool -> ?totals:bool -> ?irmin:bool -> string -> scenario list -> unit Lwt.t

run_scenarios filename benches Execute a list of scenario with options:

  • verbose: print info during execution
  • totals: adds summary data point for each step
  • irmin: adds data point for decoding / encoding the state and output the result in a csv format in a file with the provided name
OCaml

Innovation. Community. Security.