Skip to content

Commit f52aec7

Browse files
authored
N16: Profiling (#371)
1 parent 246758b commit f52aec7

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

content/posts/newsletter-016/index.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,32 @@ You can learn more [on the Learn Wgpu news page][learn-wgpu-news].
107107

108108
## Library & Tooling Updates
109109

110+
### [profiling]
111+
112+
This month, [profiling] was released on crates.io. This crate provides a very
113+
thin abstraction over instrumented profiling crates like `puffin`, `optick`,
114+
`tracy`, and `superluminal-perf`.
115+
116+
Mark up your code like this:
117+
118+
```rust
119+
#[profiling::function]
120+
fn some_function() {
121+
burn_time(5);
122+
123+
for i in 0..5 {
124+
profiling::scope!("Looped Operation");
125+
burn_time(1);
126+
}
127+
}
128+
```
129+
130+
And get visualizations like this (`optick` and `puffin` shown):
131+
132+
[![Screenshot of Optick Profiler](optick-small.png)](optick.jpeg)
133+
134+
[profiling]: https://crates.io/crates/profiling
135+
110136
### [rkyv]
111137

112138
[rkyv] is a zero-copy deserialization framework for Rust. It's similar to
141 KB
Loading
391 KB
Loading

0 commit comments

Comments
 (0)