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

README.md.html

memtrace

A streaming client for OCaml's Memprof, which generates compact traces of a program's memory use.

To profile the memory use of a program, start by putting this line somewhere at the program startup:

Memtrace.trace_if_requested ~context:"my program" ();;

If the MEMTRACE environment variable is present, tracing begins to the filename it specifies. (If it's absent, nothing happens)

The ~context parameter is optional, and can be set to any string that helps to identify the trace file.

If the program daemonises, the call to trace_if_requested should occur after the program forks, to ensure the right process is traced.

The resulting trace files can be analysed with some simple command-line tools in bin/. (More viewing tools coming soon!)

OCaml

Innovation. Community. Security.