EmbarkStudios / EmbarkStudios/puffin

Profile arbitrary spans

Open
#194 9 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
1.7k
Forks
111
Avg merge
2h 50m
Merged PRs (30d)
1

Description

I was wondering if there's a way to add arbitrary spans to puffin. It would be nice to just do the following:

```rust
let scope = puffin::profile_scope!("slow_code");

// ...

drop(scope);
```

While in a lot of scenarios function and scope profiling is sufficient, there are some performance intervals that aren't easily measured using that methodology. Say something starts in the middle of one function and ends in the middle of another for example.

Being able to insert events with arbitrary start/end times might work too, would just require timing things myself.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.