Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f52aec7

Browse filesBrowse files
authored
N16: Profiling (rust-gamedev#371)
1 parent 246758b commit f52aec7
Copy full SHA for f52aec7

File tree

Expand file treeCollapse file tree

3 files changed

+26
-0
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+26
-0
lines changed

‎content/posts/newsletter-016/index.md

Copy file name to clipboardExpand all lines: content/posts/newsletter-016/index.md
+26Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.