package hdr_histogram

  1. Overview
  2. Docs

Source file function_description.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
open Ctypes

(* This Types_generated module is an instantiation of the Types
   functor defined in the type_description.ml file. It's generated by
   a C program that Dune creates and runs behind the scenes. *)
module Types = Types_generated

module Functions (F : Ctypes.FOREIGN) = struct
  open F

  let hdr_init = foreign "hdr_init"
    (int64_t @-> int64_t @-> int @-> ptr (ptr Types.hdr_histogram) @->
     returning int)

  let hdr_record_value = foreign "hdr_record_value"
    (ptr Types.hdr_histogram @-> int64_t @-> returning bool)

  let hdr_close = foreign "hdr_close"
    (ptr Types.hdr_histogram @-> returning void)

  let hdr_value_at_percentile = foreign "hdr_value_at_percentile"
    (ptr Types.hdr_histogram @-> double @-> returning int64_t)

  let hdr_min = foreign "hdr_min"
    (ptr Types.hdr_histogram @-> returning int64_t)

  let hdr_max = foreign "hdr_max"
    (ptr Types.hdr_histogram @-> returning int64_t)

  let hdr_mean = foreign "hdr_mean"
    (ptr Types.hdr_histogram @-> returning double)

  let hdr_stddev = foreign "hdr_stddev"
    (ptr Types.hdr_histogram @-> returning double)
end