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
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_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_percentiles_print =
    foreign "hdr_percentiles_print"
      (ptr Types.hdr_histogram @-> ptr Types.file @-> int32_t @-> double
     @-> Types.format_type @-> returning int)
end