package luv

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

Module Luv.ResourceSource

Sourceval uptime : unit -> (float, Error.t) Result.result

Evaluates to the current uptime.

Binds uv_uptime. See sysinfo(2).

Sourceval loadavg : unit -> float * float * float

Evaluates to the load average.

Binds uv_loadavg. See sysinfo(2).

Sourceval free_memory : unit -> Unsigned.uint64

Evaluates to the amount of free memory, in bytes.

Binds uv_get_free_memory. See sysinfo(2).

Sourceval total_memory : unit -> Unsigned.uint64

Evaluates to the total amount of memory, in bytes.

Binds uv_get_total_memory. See sysinfo(2).

Sourceval constrained_memory : unit -> Unsigned.uint64 option
Sourceval getpriority : int -> (int, Error.t) Result.result

Evaluates to the priority of the process with the given pid.

Binds uv_os_getpriority. See getpriority(3p).

Sourceval setpriority : int -> int -> (unit, Error.t) Result.result

Sets the priority of the process with the given pid.

Binds uv_os_setpriority. See setpriority(3p).

Sourceval resident_set_memory : unit -> (Unsigned.size_t, Error.t) Result.result

Evaluates to the resident set size for the current process.

Binds uv_resident_set_memory.

Sourcetype timeval = {
  1. sec : Signed.Long.t;
  2. usec : Signed.Long.t;
}
Sourcetype rusage = {
  1. utime : timeval;
  2. stime : timeval;
  3. maxrss : Unsigned.uint64;
  4. ixrss : Unsigned.uint64;
  5. idrss : Unsigned.uint64;
  6. isrss : Unsigned.uint64;
  7. minflt : Unsigned.uint64;
  8. majflt : Unsigned.uint64;
  9. nswap : Unsigned.uint64;
  10. inblock : Unsigned.uint64;
  11. oublock : Unsigned.uint64;
  12. msgsnd : Unsigned.uint64;
  13. msgrcv : Unsigned.uint64;
  14. nsignals : Unsigned.uint64;
  15. nvcsw : Unsigned.uint64;
  16. nivcsw : Unsigned.uint64;
}
Sourceval getrusage : unit -> (rusage, Error.t) Result.result
OCaml

Innovation. Community. Security.