package tezos-benchmark

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Tezos_benchmark.BenchmarkSource

This module defines several signatures to create a benchmark. * The most generic is S; it provides a rather complete control on benchmark creation. * Simple and Simple_with_num can be used to ease benchmark creation, with simpler parameters. Registration functions in Registration will convert these simple interfaces back to S. * All the common parameters for these signatures are declared in Benchmark_base.

Sourcetype group =
  1. | Standalone
  2. | Group of string
  3. | Generic

Some benchmarks depend on others, and some are for generic parameters that most benchmarks depend on. We need this information in order to correctly infer the values of parameters after a benchmark run; the user provides it with a group.

* Standalone: benchmarks that don't depend on others (except generic ones). This is the value to use if you're not sure whether you should group your benchmark. * Group: benchmarks that belong to the given inference group. Note that setting a benchmark with a group that is referenced only in this benchmark will produce the same inference results as with Standalone. * Generic: for generic parameters only.

Sourcetype purpose =
  1. | Other_purpose of string
  2. | Generate_code of string

Described the purpose of the benchmark. * Generate_code of destination: generates code at the given destination file, prefixed by "src/proto_alpha/lib_protocol/" and suffixed by "_costs_generated.ml". * Other_purpose of purpose: any other purpose. The goal is to explain why the function is benchmarked since it does not produce a cost function.

Sourcetype 'config parameters = {
  1. bench_number : int;
  2. config : 'config;
}

Benchmark parameters.

Sourcemodule type Benchmark_base = sig ... end

Common declarations used by the different module types of benchmarks

Sourcemodule type Simple = sig ... end

A simplification of S below, when only one model is defined and no particular process is needed to generate benchmarks.

Sourcemodule type Simple_with_num = sig ... end

A simplification of S below, when only one model is defined.

Sourcemodule type S = sig ... end

The module type of benchmarks

Sourcetype t = (module S)
Sourcetype simple = (module Simple)
Sourcetype simple_with_num = (module Simple_with_num)
Sourceval pp : Format.formatter -> t -> unit
Sourcetype ('cfg, 'workload) poly = (module S with type config = 'cfg and type workload = 'workload)
Sourcetype packed =
  1. | Ex : ('cfg, 'workload) poly -> packed
Sourceval ex_unpack : t -> packed
Sourceval name : t -> Namespace.t

Get the name of a benchmark

Sourceval info : t -> string

Get the description of a benchmark

Sourceval tags : t -> string list

Get the tags of a benchmark

Sourceval get_free_variable_set : (module S) -> Free_variable.Set.t

Returns the free variables occur in the models of the benchmark.

OCaml

Innovation. Community. Security.