{"repo":"imandra-ai/catapult","free":true,"listed":false,"github":"https://github.com/imandra-ai/catapult","clone":"git clone https://github.com/imandra-ai/catapult.git","description":"Tracing library for OCaml with catapult/TEF export.","language":"OCaml","stars":10,"topics":["catapult","tracing","ocaml","profiling"],"license":null,"category":"analytics","readme_excerpt":"Catapult This is a collection of tracing backends for ocaml-trace, ultimately producing Catapult/TEF trace format. The traces are .json files (or compressed .json.gz ). They can be viewed in: - https://ui.perfetto.dev/ - chrome://tracing in chrome/chromium - https://github.com/wolfpld/tracy after conversion (the tracy-import-chrome binary) Usage Instrument your code using ocaml-trace. In the program's entry point, use one of the Catapult libraries backend to forward events from Trace into the place of your choice. An example can be found in examples/heavy/heavy.ml . sqlite To collect data directly into a local Sqlite database, use something like: (assuming this is in scope: ) network client The library catapult-client provides a tracing backend that forwards all events (messages, traces, metrics) to a network daemon. The daemon is in the catapult-daemon package. The traces can be listed and retrieved using the catapult-conv program that comes with catapult-sqlite . Systemd An example systemd service file for this daemon can be found in src/data/catapult-daemon.service . Example: \"basic\" A very stupid example (in examples/basic/basic.ml ), is: Once opened in chrome://tracing, the trace looks like this: Example: \"heavy\" A more heavy example (used to benchmark a bit the tracing), is in examples/heavy . In a terminal, run the daemon (if it's not already running): Then in another terminal: Opened in chrome, the trace looks like that (focusing on a \"step\" event): Coverage - [x] dur","default_branch":null,"files":null,"tree":[],"storefront":"/r/imandra-ai","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/imandra-ai/catapult/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}