package memtrace

  1. Overview
  2. Docs
Streaming client for Memprof

Install

Dune Dependency

Authors

Maintainers

Sources

memtrace-v0.1.2.tbz
sha256=1dc76b4bd375460c026d5a602149a1c3ea401644df38480e7b5919387b18bf83
sha512=5726ce796611bae1e24fa4b51d88dc5115cb5b2cdd36e63c4696d38d51178ace93e79a73671e04d35f3fdd1d29efb4f958a9792dca832e37ad89d82b5ee2dd6f

doc/memtrace/Memtrace/index.html

Module Memtrace

val trace_if_requested : ?context:string -> ?sampling_rate:float -> unit -> unit

If the MEMTRACE environment variable is set, begin tracing to the file it specifies, and continue tracing until the process exits.

The context is an arbitrary string, which is logged in the trace. It may be useful to identify trace files.

The sampling_rate is the proportion of allocated words that should be sampled. Values larger than about 1e-4 will have some performance impact. The sampling rate can also be specified with the MEMTRACE_RATE environment variable. If both means are used, the env var takes precedence.

May raise Unix.Unix_error if the specified file cannot be opened.

type tracer

Tracing can also be manually started and stopped.

val start_tracing : context:string option -> sampling_rate:float -> filename:string -> tracer

Manually start tracing

val stop_tracing : tracer -> unit

Manually stop tracing

module Trace : sig ... end

Use the Trace module to read and write trace files

module Memprof_tracer : sig ... end

Use Memprof_tracer in conjunction with Trace.Writer for more manual control over trace collection

OCaml

Innovation. Community. Security.