Skip to content

Commit c9b2687

Browse files
authored
Newsletter 13: Add puffin profiler (#244)
* Newsletter 13: Add a section about puffin profiler * improve phrasing
1 parent 2546eea commit c9b2687

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

content/posts/newsletter-013/index.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,30 @@ organized with one branch for each subsection.
153153

154154
## Library & Tooling Updates
155155

156+
### 🐦 [Puffin Profiler]
157+
158+
Pufin is a simple instrumentation profiler created by [Embark]
159+
where you can opt-in to profile parts of your code.
160+
161+
```rust
162+
fn my_function() {
163+
puffin::profile_function!():
164+
...
165+
if ... {
166+
puffin::profile_scope_data!("load_image", image_name):
167+
...
168+
}
169+
}
170+
```
171+
172+
The collected profile data can be viewed ingame with [imgui-rs].
173+
174+
![Puffin flamegraph shown with puffin-imgui](puffin.png)
175+
176+
[Puffin Profiler]: https://github.com/EmbarkStudios/puffin
177+
[Embark]: https://www.embark-studios.com/
178+
[imgui-rs]: https://github.com/Gekkio/imgui-rs
179+
156180
### [hexasphere] v1.0
157181

158182
![hexasphere example gif](hexasphere.gif)
184 KB
Loading

0 commit comments

Comments
 (0)