Logging, runtime tracing, and the obs performance profiler for OCaml
2.3 kB
75 lines
1(lang dune 3.21)
2(using mdx 0.4)
3
4(name observe)
5
6(generate_opam_files true)
7(implicit_transitive_deps false)
8
9; ISC for observe's own code; MIT for the memtrace fork in lib/memtrace,
10; which carries Jane Street's copyright (see lib/memtrace/LICENSE.md).
11(license "ISC AND MIT")
12
13(authors "Thomas Gazagnaire <thomas@gazagnaire.org>")
14
15(maintainers "Thomas Gazagnaire <thomas@gazagnaire.org>")
16
17
18(source (tangled gazagnaire.org/ocaml-observe))
19
20
21(package
22 (name observe)
23 (synopsis "Cmdliner logging terms and one-call setup for OCaml programs")
24 (tags (org:blacksun logging cli system))
25 (description
26 "The Observe library provides Cmdliner terms for structured logging: verbosity flags (-q, -v, -vv, -vvv), RUST_LOG-style filtering (--log=level,src:level), and JSON logs (--json). A single call to Observe.setup wires these terms into a program and also makes it instrumentable: it honours the MEMTRACE environment variable to capture an allocation trace, adopts a W3C traceparent so its spans join a distributed trace, and streams runtime_events to an obs collector when OBS_COLLECTOR is set.")
27 (depends
28 (ocaml (>= 5.2))
29 (logs (>= 0.7))
30 (fmt (>= 0.9))
31 base-unix
32 (cmdliner (>= 1.2))
33 (ptime (>= 1.0))
34 (mtime (>= 2.0))
35 bytesrw
36 nox-json
37 nox-catapult
38 nox-protobuf
39 nox-varint
40 json-logs
41 probe
42 (eio (>= 1.0))
43 vsock
44 (mdx :with-test)
45 (alcotest :with-test)))
46
47(package
48 (name obs)
49 (synopsis "Performance profiler that captures and reports OCaml runtime traces")
50 (tags (org:blacksun cli system))
51 (description
52 "obs captures a program's runtime_events scheduler and GC trace, its memtrace allocation trace, ocaml-probe spans, and a native CPU profile by default, then reports a wall-clock budget and a verdict. It writes Fuchsia (.fxt) and Catapult/Perfetto (.pb) traces and a Perfetto-schema SQLite database: obs query runs SQL over a captured trace and obs hotspots drills allocation sites.")
53 (depends
54 (ocaml (>= 5.2))
55 (observe (= :version))
56 (logs (>= 0.7))
57 (fmt (>= 0.9))
58 base-unix
59 (cmdliner (>= 1.2))
60 (mtime (>= 2.0))
61 bytesrw
62 nox-json
63 nox-catapult
64 xctrace
65 probe
66 hdr
67 uuidm
68 cstruct
69 sqlite
70 (eio (>= 1.0))
71 (eio_main (>= 1.0))
72 vsock
73 console
74 (monitor :with-test)
75 (alcotest :with-test)))