package trace-fuchsia

  1. Overview
  2. Docs
A high-performance backend for trace, emitting a Fuchsia trace into a file

Install

Dune Dependency

Authors

Maintainers

Sources

trace-0.9.1.tbz
sha256=9739d5f46becb407e96943f4f0d6d0919e03c14299ab9c2ddbb8d46b6f7a3ea4
sha512=500230dedc834cbb8535a1624408c2f0e67683bacef5e4a55b7639c4013f6247d3aa4cbc56b61810d0138f736c1245b6b334bd3991c2e86d03faee47b729c547

doc/trace-fuchsia/Trace_fuchsia/index.html

Module Trace_fuchsiaSource

Fuchsia trace collector.

This provides a collector for traces that emits data into a file using the compact binary Fuchsia trace format. This reduces the tracing overhead compared to trace-tef, at the expense of simplicity.

Sourceval collector : out:[ `File of string | `Stderr | `Stdout ] -> unit -> Trace_core.collector

Make a collector that writes into the given output. See setup for more details.

Sourcetype output = [
  1. | `Stdout
  2. | `Stderr
  3. | `File of string
]

Output for tracing.

  • `Stdout will enable tracing and print events on stdout
  • `Stderr will enable tracing and print events on stderr
  • `File "foo" will enable tracing and print events into file named "foo"
Sourceval setup : ?out:[ output | `Env ] -> unit -> unit

setup () installs the collector depending on out.

  • parameter out

    can take different values:

    • regular output value to specify where events go
    • `Env will enable tracing if the environment variable "TRACE" is set.
  • If it's set to "1", then the file is "trace.fxt".
  • If it's set to "stdout", then logging happens on stdout (since 0.2)
  • If it's set to "stderr", then logging happens on stdout (since 0.2)
  • Otherwise, if it's set to a non empty string, the value is taken to be the file path into which to write.
Sourceval with_setup : ?out:[ output | `Env ] -> unit -> (unit -> 'a) -> 'a

with_setup () f (optionally) sets a collector up, calls f(), and makes sure to shutdown before exiting.

OCaml

Innovation. Community. Security.