mirage-profile

AuthorThomas Leonard <talex5@gmail.com>
LicenseBSD-2-clause
Homepagehttps://github.com/mirage/mirage-profile
Issue Trackerhttps://github.com/mirage/mirage-profile/issues
MaintainerThomas Leonard <talex5@gmail.com>
Dependencies
&cstruct>= 3.0.0
jbuilder>= 1.0+beta9
lwt
ocplib-endian
ppx_cstruct
Availableocaml-version >= "4.03.0"
PublishedNov 22, 2017
Source [http] https://github.com/mirage/mirage-profile/releases/download/v0.8.2/mirage-profile-0.8.2.tbz
7f094bcb0b81746a712326ea583b2e76
StatisticsInstalled 189 times last month.
Edithttps://github.com/ocaml/opam-repository/tree/master/packages/mirage-profile/mirage-profile.0.8.2/opam

Collect runtime profiling information in CTF format

This library can be used to trace execution of OCaml/Lwt programs (such as Mirage unikernels) at the level of Lwt threads. The traces can be viewed using JavaScript or GTK viewers provided by [mirage-trace-viewer][] or processed by tools supporting the [Common Trace Format (CTF)][ctf]. Some example traces can be found in the blog post Visualising an Asynchronous Monad.

Libraries can use the functions mirage-profile provides to annotate the traces with extra information. When compiled against a normal version of Lwt, mirage-profile's functions are null-ops (or call the underlying untraced operation, as appropriate) and OCaml's cross-module inlining will optimise these calls away, meaning there should be no overhead in the non-profiling case.