memtrace
Streaming client for Memprof
README
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/, but the recommended interface is the
memtrace viewer, which lives at:
https://github.com/janestreet/memtrace_viewer
Install
- Published
-
24 Mar 2022
- Maintainers
-
Sources
memtrace-0.2.2.tbz
sha256=9500666006b235a0bd0a7efa4ffa1329556d59572c3eb4d19b387cbf13c4c48f
sha512=c4528cbdb6fe4832f54334c418b7a3380f353df14ab00f61513eaa1f972b7e4295ea56fe60392e1c6245d64d63262fec1b5dd577ab0756e1304c880b5d05c072
Dependencies
Reverse Dependencies
irmin-bench
< "3.3.0"
memtrace_viewer
>= "v0.15.0"