File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,34 @@ Asynchronous HTTP 1.1 parser.
18
18
$ cargo add async-h1
19
19
```
20
20
21
+ ## Profiling
22
+ __ build server__
23
+ ``` sh
24
+ $ cargo build --examples server --release
25
+ ```
26
+
27
+ __ profile script__
28
+ ``` sh
29
+ #! /bin/bash
30
+ set -x
31
+ perf record -F 997 -g " ./target/release/examples/server"
32
+ perf script > /tmp/out.perf
33
+ stackcollapse-perf /tmp/out.perf > /tmp/out.folded
34
+
35
+ outfile=" /tmp/$( date +%F-%T) -flamegraph.svg"
36
+ flamegraph /tmp/out.folded > " $outfile "
37
+ # rm perf.data /tmp/out.perf /tmp/out.folded
38
+
39
+ firefox " $outfile "
40
+ ```
41
+
42
+ __ load testing__
43
+ Using [ autocannon] ( https://github.com/mcollina/autocannon ) do:
44
+
45
+ ``` rust
46
+ $ autocannon localhost : 8080 - l
47
+ ```
48
+
21
49
## Safety
22
50
This crate uses `` #![deny(unsafe_code)] `` to ensure everything is implemented in
23
51
100% Safe Rust.
You can’t perform that action at this time.
0 commit comments