package tezos-benchmark

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

Module Tezos_benchmark.NamespaceSource

Namespace implements a type for the name of the benchmarks in Snoop It can be seen as a path of several names, similar to a file system

Sourcetype t

The type of the namespaces

Sourceval empty : t

The empty namespace, printed as "."

Sourceval equal : t -> t -> bool
Sourceval is_empty : t -> bool
Sourceval is_singleton : t -> bool

Tests if the namespace contains only one name

Sourceval compare : t -> t -> int
Sourceval hash : t -> int
Sourceval to_string : t -> string
Sourceval of_string : string -> t
Sourceval to_filename : t -> string

String representation without '/', usable for file names. It is usable for Graphviz vertex names with String.escaped.

Example: to_filename (of_string "foo/bar/gee.txt") = "foo__bar__gee.txt"

Sourcetype cons = string -> t

The type of namespace constructors, which represent intermediate namespaces. Given a string, it returns a terminal namespace which is then used for benchmark names.

Sourceval cons : t -> string -> t
Sourceval root : cons

The basic constructor for namespaces, at the root of every other namespace. root "bench" would return the namespace "bench" for a benchmark

Sourceval make : cons -> string -> cons

Creates a constructor by appending a name to another constructor If ns represents the namespace A/B/C/, then make ns "D" would return the constructor for the namespace A/B/C/D/

Sourceval basename : t -> string

Returns the basename of t, which is the name furthest from the root. basename empty is ".". basename (cons s) is s for any constructor cons.

Sourceval to_list : t -> string list

Returns the path of n as a list. The head of the list is the start of the path, which is always ".". If n is empty, only returns ["."]. Never returns the empty list.

Sourceval of_list : string list -> t

Returns a path represented by the given list. If the first element is ".", removes it. Checks that all elements don't contain '/'.

Sourceval name_match : t -> t -> bool

name_match pattern name returns true if and only if pattern is a prefix of name.

Sourceval pp : Format.formatter -> t -> unit

Pretty printer

Sourceval pp_short : Format.formatter -> t -> unit

Short printer that only prints the basename of the namespace

Sourcemodule Hashtbl : Tezos_base.TzPervasives.Hashtbl.SeededS with type key = t
Sourcemodule Set : Tezos_base.TzPervasives.Set.S with type elt = t
Sourcemodule Map : Tezos_base.TzPervasives.Map.S with type key = t
OCaml

Innovation. Community. Security.