Monorepo management for opam overlays
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(memtrace): modernize package and integrate cmdliner term into all binaries

Modernize the memtrace package for the monorepo: convert Printf to Fmt,
restructure tests into alcotest pattern with suite exports, add cmdliner
term (--memtrace, --memtrace-rate, --memtrace-context), and add
argv-peeking trace_if_requested. Integrate Memtrace.term into setup
terms across all binaries that previously called trace_if_requested().

+6 -4
+5 -1
bin/common.ml
··· 10 10 11 11 Note: --json and --log-tag are disabled since monopam doesn't use JSON logs. 12 12 *) 13 - let logging_term = Vlog.setup ~json_reporter:None "monopam" 13 + let logging_term = 14 + Term.( 15 + const (fun () () -> ()) 16 + $ Vlog.setup ~json_reporter:None "monopam" 17 + $ Memtrace.term) 14 18 15 19 let package_arg = 16 20 let doc = "Package name. If not specified, operates on all packages." in
+1 -3
bin/main.ml
··· 69 69 Cmd_test.cmd; 70 70 ] 71 71 72 - let () = 73 - Memtrace.trace_if_requested ~context:"monopam" (); 74 - exit (Cmd.eval main_cmd) 72 + let () = exit (Cmd.eval main_cmd)