All Projects → AestheticIntegration → ocaml-tracy

AestheticIntegration / ocaml-tracy

Licence: other
Bindings to the Tracy profiler

Programming Languages

ocaml
1615 projects
C++
36643 projects - #6 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to ocaml-tracy

profiler
Continuous profiling based on pprof
Stars: ✭ 221 (+952.38%)
Mutual labels:  profiling
ghc-stack
Hacking GHC's Stack for Fun and Profit (featuring The Glorious Haskell Debugger v0.0.1 Pre-alpha)
Stars: ✭ 69 (+228.57%)
Mutual labels:  profiling
cov
An emacs extension for displaying coverage data on your code
Stars: ✭ 65 (+209.52%)
Mutual labels:  profiling
golden
a benchmark for compile-time and/or runtime Nim 🏆
Stars: ✭ 28 (+33.33%)
Mutual labels:  profiling
jstackSeries.sh
Script for capturing a series of thread dumps from a Java process using jstack (on Linux and Windows)
Stars: ✭ 28 (+33.33%)
Mutual labels:  profiling
PHPench
Realtime benchmarks for PHP code
Stars: ✭ 53 (+152.38%)
Mutual labels:  profiling
mapbox-ios-binding
Xamarin binding library for Mapbox iOS SDK
Stars: ✭ 15 (-28.57%)
Mutual labels:  bindings
tracy
Basecalling, alignment, assembly and deconvolution of Sanger Chromatogram trace files
Stars: ✭ 73 (+247.62%)
Mutual labels:  tracy
DotNetJS
Consume C# in JavaScript with comfort: single-file UMD library, auto-generated 2-way bindings and type definitions
Stars: ✭ 551 (+2523.81%)
Mutual labels:  bindings
defpro
Defold Profiler interaction using Lua
Stars: ✭ 19 (-9.52%)
Mutual labels:  profiling
hoedown
rust bindings for hoedown
Stars: ✭ 16 (-23.81%)
Mutual labels:  bindings
loam
Javascript wrapper for GDAL in the browser
Stars: ✭ 174 (+728.57%)
Mutual labels:  bindings
gfort2py
Library to allow calling fortran code from python
Stars: ✭ 60 (+185.71%)
Mutual labels:  bindings
iopipe-js
Build and run serverless apps with confidence on AWS Lambda with Tracing, Profiling, Metrics, Monitoring, and more.
Stars: ✭ 33 (+57.14%)
Mutual labels:  profiling
htaglib
Haskell bindings for TagLib, an audio meta-data library
Stars: ✭ 20 (-4.76%)
Mutual labels:  bindings
nodeprof.js
Instrumentation framework for Node.js compliant to ECMAScript 2020 based on GraalVM.
Stars: ✭ 44 (+109.52%)
Mutual labels:  profiling
observable-profiler
Tracks new & disposed Observable subscriptions
Stars: ✭ 41 (+95.24%)
Mutual labels:  profiling
rsmpeg
A Rust crate that exposes FFmpeg's power as much as possible.
Stars: ✭ 390 (+1757.14%)
Mutual labels:  bindings
popsicle
Popsicle aims to bridge the JUCE c++ framework to python.
Stars: ✭ 102 (+385.71%)
Mutual labels:  bindings
aws-codeguru-profiler-demo-application
Example application demonstrating the features of Amazon CodeGuru Profiler
Stars: ✭ 21 (+0%)
Mutual labels:  profiling

OCaml-tracy build

This repo contains bindings to Tracy, a profiler and trace visualizer. It's licensed, like Tracy, under BSD-3-Clause.

The bindings are pretty basic and go through the C API, not the C++ one (RAII is not compatible with having a function call to enter, and one to exit).

It depends on a C++ compiler to build, along with the dependencies of Tracy-client.

Feature table

feature supported
zones
messages
plots
locks
screenshots
frames
gpu

In some cases the feature might not provide all options.

Example

The file examples/prof1.ml shows basic instrumentation on a program that computes the Fibonacci function (yes, not representative) in a loop on 3 threads. If Tracy is running and is waiting for a connection (press "connect"), running dune exec ./examples/prof1.exe should start tracing and display something like this: tracy screenshot

Usage

  • the tracy library is a virtual dune library which provides the type signatures for instrumenting your code. It's very small and is ok to add to a library.

    For example in prof1.ml, we start with:

    T.name_thread (Printf.sprintf "thread_%d" th_n);

    to name the n-th worker thread. Then later we have calls like:

    T.with_ ~file:__FILE__ ~line:__LINE__ ~name:"inner.fib" () @@ fun _sp ->
      T.set_color _sp 0xaa000f;
      (* rest of code in the span _sp *)

    to create a span in Tracy, with a custom color, and the name inner.fib. One can also add text and values to the span. Alternatively, Tracy.enter and Tracy.exit can be used to delimit the span manually.

    To start, one needs to call Tracy.enable().

  • the tracy-client package contains the actual C bindings (using a vendored copy of tracy), and implements the virtual library by providing actual instrumentation.

  • the tracy.none library (comes in tracy) replaces all instrumentation calls with no-op, which might be inlined by ocamlopt. This is the default implementation and it means that just adding tracy to a library will not incur much at compile time and runtime.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].