package tezos-benchmark

  1. Overview
  2. Docs
type 'aspect probe = {
  1. apply : 'a. 'aspect -> (unit -> 'a) -> 'a;
  2. aspects : unit -> 'aspect list;
  3. get : 'aspect -> float list;
}

A probe implements an instrumented apply function. The implementation of apply is meant to record in a side-effecting way the result of a benchmark for the given closure. get allows to retrieve the results.

type 'workload benchmark =
  1. | Calculated : {
    1. workload : 'workload;
    2. measure : unit -> float;
    } -> 'workload benchmark
  2. | Plain : {
    1. workload : 'workload;
    2. closure : unit -> unit;
    } -> 'workload benchmark
  3. | With_context : {
    1. workload : 'workload;
    2. closure : 'context -> unit;
    3. with_context : 'a. ('context -> 'a) -> 'a;
    } -> 'workload benchmark
  4. | With_probe : {
    1. workload : 'aspect -> 'workload;
    2. probe : 'aspect probe;
    3. closure : 'aspect probe -> unit;
    } -> 'workload benchmark

The type of benchmarks. Measurements of benchmarks are directly calculated by measure or measured as the execution time of closure. Some benchmark requires to set-up/cleanup artifacts when being run, in that case use With_context with a proper implementation of the with_context function.

module type S = sig ... end
OCaml

Innovation. Community. Security.