package devkit

  1. Overview
  2. Docs
Development kit - general purpose library

Install

Dune Dependency

Authors

Maintainers

Sources

1.2.tar.gz
sha256=28f4c68127579b86c5f50e01e444e8c51f0543bc5472c2dcac28993bc88aa756
md5=0317493fa5cc1054a882ceca59ce5992

doc/devkit.core/Devkit_core/Var/index.html

Module Devkit_core.VarSource

Global register for various types of counters

Sourcetype attributes = (string * string) list
Sourcetype t =
  1. | Time of Time.t
  2. | Count of int
  3. | Bytes of int
Sourceval show_a : (string * string) list -> string
Sourceval is_in_families : string -> bool
Sourceclass typ : string -> ?attr:attributes -> string -> object ... end

new typ type ?attr key registers new type of counters with designated attributes and key name

Sourceval cc : ('a -> string) -> string -> ?attr:attributes -> string -> 'a Cache.Count.t

cc pp type ?attr key new set of counters with designated type, attributes and key name

Logstash events will have attributes as follows : * all of attr key value pairs (if given) * class=type * key=X where X is value inserted into CC

Guidelines for picking names : keep number of different key names low (makes ES happy), uniqueness of events is primarily provided by class.

Bad example : let pages = new Var.cc "tool.pages" "pages" let index = new Var.cc "tool.index" "index" let count = new Var.cc "tool.count" "count"

Better : let pages = new Var.cc "tool.pages" "kind" let pages = new Var.cc "tool.index" "kind" let pages = new Var.cc "tool.count" "kind"

Sourceval cc_ms : ('a -> string) -> string -> ?attr:attributes -> string -> 'a Cache.Count.t

cc pp type ?attr key new set of counters with designated type, attributes and key name, treated as milliseconds

Sourceval iter : (attributes -> t -> unit) -> unit

callback takes attributes and value

Sourceval list_stats : string list -> string list

list_stats filter

  • returns

    a list containing a printed line for each counter whose type is in filter.

OCaml

Innovation. Community. Security.