Simple timings profiler

Related tags

Utilities profl
Overview

profl

Simple timings profiler

Example

fn main() -> std::io::Result<()> {
    profl::init("timings.data");

    let mut total = 0;
    for i in 0..1000 {
        total += profl::span!("some_ctx", {
            // long operation
            std::thread::sleep(std::time::Duration::from_millis(i % 40));
            i
        });
    }

    Ok(())
}

Processing results:

profl --path timings.data

Rendered metrics (plot.svg)

Timings plot

Output:

All ids:
some_ctx: 684
Histogram for some_ctx
Distribution
    0µs | *                                        |  0.1th %-ile
 1114µs | **                                       |  5.1th %-ile
 3145µs | ***                                      | 10.5th %-ile
 5242µs | **                                       | 15.4th %-ile
 7340µs | ***                                      | 20.5th %-ile
 9437µs | **                                       | 25.4th %-ile
11534µs | **                                       | 30.4th %-ile
13631µs | **                                       | 35.2th %-ile
15728µs | ***                                      | 40.4th %-ile
17825µs | **                                       | 45.3th %-ile
19922µs | **                                       | 50.1th %-ile
20971µs | **                                       | 52.8th %-ile
22020µs | *                                        | 55.3th %-ile
23068µs | **                                       | 58.3th %-ile
24117µs | **                                       | 62.1th %-ile
25165µs | **                                       | 64.9th %-ile
26214µs | *                                        | 67.1th %-ile
27262µs | **                                       | 69.7th %-ile
28311µs | **                                       | 72.7th %-ile
28311µs |                                          | 72.7th %-ile
29360µs | *                                        | 75.1th %-ile
30408µs | *                                        | 77.6th %-ile
30408µs |                                          | 77.6th %-ile
31457µs | *                                        | 80.0th %-ile
32505µs | **                                       | 82.6th %-ile
32505µs |                                          | 82.6th %-ile
32505µs |                                          | 82.6th %-ile
33554µs | *                                        | 85.1th %-ile
33554µs |                                          | 85.1th %-ile
35651µs | **                                       | 90.1th %-ile
35651µs |                                          | 90.1th %-ile
35651µs |                                          | 90.1th %-ile
35651µs |                                          | 90.1th %-ile
35651µs |                                          | 90.1th %-ile
You might also like...
Simple ray tracer written in Rust
Simple ray tracer written in Rust

Simple ray tracer written in Rust from scratch I've just finished my first semester at the Faculty of Applied Mathematics and Computer Science at the

Czkawka is a simple, fast and easy to use app to remove unnecessary files from your computer.
Czkawka is a simple, fast and easy to use app to remove unnecessary files from your computer.

Multi functional app to find duplicates, empty folders, similar images etc.

Simple popup for using marks in Sway

Simple popup for using marks in Sway This allows you to use vim-like marks in sway easily. Usage: bindsym --to-code $mod+m exec sway-marker mark binds

Simple RSA VDF in Rust

Simple RSA VDF in Rust

Simple color picker that lets the user create harmonic palettes with ease.
Simple color picker that lets the user create harmonic palettes with ease.

epick Simple color picker that lets the user create harmonic palettes with ease. Get it You can checkout the web demo over here or get a native binary

Simple pomodoro timer with notifications
Simple pomodoro timer with notifications

omo Simple pomodoro timer with notifications Installation

Simple comparison app for iRacing car setups.
Simple comparison app for iRacing car setups.

CarTunes Simple comparison app for iRacing car setups. About Export a setup in the iRacing garage and CarTunes will let you compare it with other setu

Simple Spreadsheet editor written in Rust

Rexcel Simple Spreadsheet editor written in Rust Keyboard Shortcuts: CTRL + S = Save CTRL + Q = Quit CTRL + W + Save And Quit CTRL + ALT + S = Sav

simple epoch-based reclamation

ebr a simple epoch-based reclamation (EBR) library with low cacheline ping-pong. use ebr::Ebr; let mut ebr: EbrBoxu64 = Ebr::default(); let mut

Owner
Broxus
Broxus
A tracing profiler for the Sega MegaDrive/Genesis

md-profiler, a tracing profiler for the Sega MegaDrive/Genesis This program, meant to be used with this fork of BlastEm, helps you finding bottlenecks

null 15 Nov 3, 2022
Py-spy - Sampling profiler for Python programs

py-spy: Sampling profiler for Python programs py-spy is a sampling profiler for Python programs. It lets you visualize what your Python program is spe

Ben Frederickson 9.5k Jan 8, 2023
🐦 Friendly little instrumentation profiler for Rust 🦀

?? puffin The friendly little instrumentation profiler for Rust How to use fn my_function() { puffin::profile_function!(); ... if ... {

Embark 848 Dec 29, 2022
The axiom profiler for exploring and visualizing SMT solver quantifier instantiations (made via E-matching).

Axiom Profiler A tool for visualising, analysing and understanding quantifier instantiations made via E-matching in a run of an SMT solver (at present

Viper Project 18 Oct 18, 2022
A memory profiler for Linux.

Bytehound - a memory profiler for Linux Features Can be used to analyze memory leaks, see where exactly the memory is being consumed, identify tempora

Koute 3.3k Dec 25, 2022
Sampling profiler and tracer for Ruby (CRuby) which runs in BPF

rbperf rbperf is a low-overhead sampling profiler and tracer for Ruby (CRuby) which runs in BPF Build To build rbperf you would need a Linux machine w

Javier Honduvilla Coto 75 Dec 19, 2022
🐝🦀🔥 An ebpf based CPU profiler written in Rust

profile-bee ?? ?? ?? Profile Bee is an eBPF based CPU profiler written in Rust for performance and efficiency. Aya is used for building the BPF progra

Joshua Koo 5 Dec 16, 2022
Simple timer for your terminal

consoleTimer Simple timer that allows you to initiate countdown from N seconds. Usage: consoletimer [time in seconds] consoletimer [time in minutes]m

Arthur 20 Apr 4, 2022
Simple tool for scaffolding

quick-skeleton tldr; Lightweight replacement for yeoman or slush. Powered by handlebars. This is a scaffolding tool to save you hours of writing boile

Arthur 23 Apr 21, 2022
Simple git/hg tui client focused on keyboard shortcuts

verco A simple Git/Hg tui client focused on keyboard shortcuts Screenshots Platforms This project uses Cargo and pure Rust stable and works on latest

Matheus Lessa Rodrigues 214 Dec 26, 2022