package memtrace

  1. Overview
  2. Docs
Streaming client for Memprof

Install

dune-project
 Dependency

Authors

Maintainers

Sources

memtrace-v0.1.tbz
sha256=fd8b18cc416f4ab52c664b04f1b0c2b7259c352a8138e6549923ebd68a058c9c
sha512=5cdc25e905db688332b6309e6b87cf1d6a692f7157569c7ada279c0929c3da6e0b1fa7f5bc827cff00fe2c1f2619ebc49344b6114786c39dd8aee1ad6b3fe55e

doc/README.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.