package tracy-client

  1. Overview
  2. Docs
Client bindings to the Tracy profiler (v0.9.1)

Install

dune-project
 Dependency

Authors

Maintainers

Sources

tracy-client-0.2.tbz
sha256=ec8372202ae1b9a33053d06deebc751d68520853c230d7fb1716aacab3bec918
sha512=264b8313db474aaca244995d8a7eeec0abae133fb655a77d31d8865ffd4086b4d163f5bc6c47bc915a97abd352df0fa005f09d6455ef9b8c3cb58fde3e840154

doc/tracy-client/Tracy_client/index.html

Module Tracy_clientSource

Bindings to the client

Sourcetype span = int
Sourceval enter : ?cs_depth:int -> __FILE__:string -> __LINE__:int -> ?__FUNCTION__:string -> string -> span

enter ~__FILE__ ~__LINE__ name enters a span.

  • parameter __FILE__

    the filename, typically you can use __FILE__

  • parameter __LINE__

    the line number in file, typically you can use __LINE__

  • parameter __FUNCTION__

    if provided, documents the function in which the call occurs (typically you can use __FUNCTION__)

  • parameter name

    name for the span. This is what appears in Tracy on the span.

  • parameter cs_depth

    if provided, depth of call stack to capture. Using this parameter makes the capture slower but captures a stack trace.

Sourceval set_app_info : string -> unit

Set application information

Sourceval add_text : span -> string -> unit

add_text span s annotates the span with text s. This can be called several times on the same span.

Sourceval add_text_f : span -> ((('a, Format.formatter, unit, unit) format4 -> 'a) -> unit) -> unit

Formatted version of add_text.

Usage: add_text_f span (fun k -> k "some %s message! (%d/100)" "formatted" 100).

Sourceval add_value : span -> int64 -> unit

add_value span v annotates the span with a numeric value (which should be unsigned).

Sourceval set_color : span -> int -> unit

set_color span c sets the color of the span.

c is an integer that represents a color using a RGB triple as follows: 0xRRGGBB.

Sourceval with_ : ?cs_depth:int -> __FILE__:string -> __LINE__:int -> ?__FUNCTION__:string -> string -> (span -> 'a) -> 'a

Run function within a span. See enter for more details about the parameters.

Sourceval exit : span -> unit

Must be called on the same thread as enter

Sourceval name_thread : string -> unit

Give a name to the current thread

Sourceval message : string -> unit

Send a message

Sourceval message_f : ((('a, Format.formatter, unit, unit) format4 -> 'a) -> unit) -> unit

Send a formatted message. Usage: message_f (fun k -> k "hello %s %d" "world" 42)

Sourceval plot : string -> float -> unit