You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -49,15 +48,15 @@ Criterion is still recommended for more rigorous statistical analysis, but Divan
49
48
For performance, the profiling cycle is a 3-step process in which you need to first measure the resources consumed by your application, then isolate the most consuming ones, and finally optimize them.
50
49
This cycle repeats until the performance goals are met.
51
50
To carry out this optimization cycle, we recommend the following profiling tools, as they are powerful, general-purpose, and are either written or well integrated with Rust:
52
-
*[Hyperfine](https://crates.io/crates/hyperfine): Provides a simple CLI interface that allows us to benchmark compiled binaries.
53
-
*[Samply](https://crates.io/crates/samply): Generates a detailed graphic of the different operations and their time in the application. We recommend it over [FlameGraph](https://crates.io/crates/flamegraph) as it allows for filtering, and the webserver viewer provides a better experience than the `.svg` your get from Flamegraph.
51
+
*[Hyperfine](https://crates.io/crates/hyperfine): Provides a simple CLI interface that allows us to benchmark compiled binaries.
52
+
*[Samply](https://crates.io/crates/samply): Generates a detailed graphic of the different operations and their time in the application. We recommend it over [FlameGraph](https://crates.io/crates/flamegraph) as it allows for filtering, and the webserver viewer provides a better experience than the `.svg` your get from Flamegraph.
54
53
*[Dhat](https://crates.io/crates/dhat): Measures memory allocations within the application.
55
54
56
55
### Hyperfine
57
56
58
57
Once [installed](https://github.com/sharkdp/hyperfine?tab=readme-ov-file#installation), we can simply run:
59
58
```sh
60
-
hyperfine 'TODO(template) update with your binary e.g. ./target/release/...'
59
+
hyperfine 'TODO(template) update with your binary e.g. ./target/release/...'
61
60
```
62
61
### Samply
63
62
@@ -84,7 +83,7 @@ Then, we can run:
84
83
```sh
85
84
samply record 'TODO(template) update with your binary e.g. ./target/release/...'
86
85
```
87
-
This command will open a browser page that contains a graphic representation of where the time is being spent in our application.
86
+
This command will open a browser page that contains a graphic representation of where the time is being spent in our application.
88
87
89
88
### Dhat
90
89
We can add Dhat as a dependency:
@@ -114,4 +113,4 @@ But these 3 should be enough for the average application to identify bottlenecks
114
113
115
114
For async-rust we also recommend: [Tracing](https://crates.io/crates/tracing), [Tokio-Console](https://crates.io/crates/tokio-console), and [Oha](https://crates.io/crates/oha).
116
115
For Rayon-based parallel Rust code, we recommend Samply.
117
-
It provides good profiling despite missing some multithreading details.
116
+
It provides good profiling despite missing some multithreading details.
0 commit comments