timedilator-2

Crates.iotimedilator-2
lib.rstimedilator-2
version0.2.2
sourcesrc
created_at2022-03-08 00:26:23.769127
updated_at2022-08-01 09:44:09.221492
descriptionFaster real-time TUI tracing profiler for the nanoprof C library
homepagehttps://codeberg.org/Kiith/timedilator-2
repositoryhttps://codeberg.org/Kiith/timedilator-2
max_upload_size
id545356
size1,873,058
Ferdinand Majerech (kiith-sa)

documentation

https://docs.rs/timedilator-2

README

timedilator-2

Minimum-overhead TUI tracing/frame profiler for low-latency application development.

Views data recorded by the nanoprof instrumentation library.

WARNING: this project is in a very early stage, there will be breaking changes in both the UI and the underlying profiling data format (as well as the nanoprof library).

About

Timedilator-2 is similar to tracing (aka frame) profilers used in game development such as Optick or RAD Telemetry, but it was written for a specific work environment, developing low-latency network applications. These often run on slow harware with no display output and only an SSH connection to work with. This resulted in the following requirements:

  1. User interface must work without graphical output, in terminal to allow profiling directly on a device in real-time over an SSH connection.
  2. Tracing profilers generate a lot of data each second, which has to either be recorded or sent somewhere (perhaps over the very network we're developing for). Profiling data should be as minimal, as 'compressed' as possible.
  3. Latencies relevant for these applications is even shorter than in games - while a frame may take 16 milliseconds to render, we may have a microsecond or less to process to process a packet. Profiling overhead should be as minimal as possible, even if it makes it less convenient to add instrumentation.

The resulting profiler is useful for very-low-latency applications, and should also be decent for game development, but if you don't like TUI you may want to look at alternatives.

Features

  • Nanosecond precision (depending on platform CPU clock precision)
  • Manual instrumentation using the nanoprof library
  • Low CPU overhead
  • Visual profiling with a TUI - we use Unicode glyphs and RGB colors to make usage this as 'visual' as possible
  • Help information directly on the screen at all times
  • Statistics about profiled code scopes such as duration percentiles, frequencies, etc.
  • Should work on any terminal with RGB color support - only tested on Linux and OSX so far
  • Profile multiple threads simultaneously
  • Can open profiled data (.nanoprof files) in real time as they are being written, or finished after measurement.

Getting started

C/C++

See nanoprof's getting started tutorial.

TODO: support for more languages

License

Licensed under the MIT license, see file LICENSE.

Commit count: 0

cargo fmt