package core_profiler

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

The first and last points are stored explicitly, not least to ensure that there are two of them. The list of points in the middle is stored in reverse order for convenience when checking the path.

In a path, we might demand that we go from A -> B directly, or A -> B possibly via some other points. This is represented as { first = Direct_point a; last = b; ... } and { first = Point a; last = b; ... } respectively; that is, whether or not it must go directly is stored on the source, not the destination.

A final example: { first = Point a; middle_rev = [Direct_point b]; last = c } matches any sequence of points that starts at a, goes (possibly via some other distinct points) to b, and then directly from b to c.

This and the Event_generator.t do not have the full power of regular expressions Notably, the same point may not appear in a path twice, except for when its second appearance is the last point in the path.

type 'a point =
  1. | Direct_point of 'a
  2. | Point of 'a
val sexp_of_point : ('a -> Sexplib0.Sexp.t) -> 'a point -> Sexplib0.Sexp.t
val point_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a point
val compare_point : ('a -> 'a -> int) -> 'a point -> 'a point -> int
type 'a t = {
  1. first : 'a point;
  2. rest_rev : 'a point list;
  3. last : 'a;
}
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
module I : sig ... end
val string_t_of_string : string -> string t option
val string_t_to_string : string t -> string
val examples : string t list
val readme : string Core.Lazy.t
val lookup_ids : string t -> Util.Name_map.group -> Core_profiler.Probe_id.t t
val lookup_names : Core_profiler.Probe_id.t t -> Reader.Header.t -> string t
val id_t_to_string : Core_profiler.Probe_id.t t -> ?with_group:string -> Reader.Header.t -> string
val first : 'a t -> 'a

Get t.first, discarding whether the first point is Direct_point or a Point

val last : 'a t -> 'a