Skip to content

Commit 54fbc3c

Browse files
authored
docs(bench): update docs to reflect aws-lc default (#4336)
1 parent 670cb43 commit 54fbc3c

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
lines changed

bindings/rust/bench/README.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,21 @@ All benchmarks are run in an idealized environment, using only a single thread a
1111
../generate.sh
1212
1313
# set up bench crate
14-
scripts/generate-certs.sh
15-
scripts/install-aws-lc.sh
14+
./scripts/generate-certs.sh
1615
17-
# run all benchmarks (s2n-tls with AWS-LC)
18-
mkdir .cargo
19-
cat aws-lc-config/s2n.toml > .cargo/config.toml
16+
# run all benchmarks
2017
cargo bench
21-
scripts/bench-memory.sh
22-
cargo bench --bench handshake --bench throughput -- --profile-time 5
23-
rm -rf .cargo
2418
```
2519

2620
## Setup
21+
The benchmarked TLS implementations will be
22+
- s2n-tls using AWS-LC for a cryptographic backend.
23+
- rustls using Ring for a cryptographic backend
24+
- OpenSSL - libssl & libcrypto
2725

28-
Setup is easy! Just have OpenSSL installed, generate Rust bindings for s2n-tls using `../generate.sh`, and generate certs using `scripts/generate-certs.sh`.
26+
All of the cryptographic backends, including AWS-LC and OpenSSL libcrypto are consumed as vendored builds from crates.io, and do not need to be installed on the benchmarking host. Note that the `aws-lc-sys` crate depends on CMake in its buildscript, so CMake must be installed on the benchmarking host.
2927

30-
Dependencies are the same as with s2n-tls. Currently, this crate has only been tested on Ubuntu (both x86 and ARM), but we expect everything to work with other Unix environments.
31-
32-
To bench with AWS-LC, Amazon's custom libcrypto implementation, first run `scripts/install-aws-lc.sh` to install AWS-LC for the bench crate. To then run the benchmarks with AWS-LC, use Cargo with either the flag `--config aws-lc-config/s2n.toml` or `--config aws-lc-config/rustls.toml` (or both). You can also append these configs to `.cargo/config.toml` to let Cargo automatically detect the settings without specifying the flags each time.
28+
Currently, this crate has only been tested on Ubuntu (both x86 and ARM), but we expect everything to work with other Unix environments.
3329

3430
### Features
3531

@@ -93,7 +89,7 @@ To do historical benchmarks, run `scripts/bench-past.sh`. This will checkout old
9389

9490
The last version benched is v1.3.16, since before that, the s2n-tls Rust bindings have a different API and would thus require a different bench harness to test.
9591

96-
v1.3.30-1.3.37 are not benched because of depedency issues when generating the Rust bindings. However, versions before and after are benched, so the overall trend in performance can still be seen without the data from these versions.
92+
v1.3.30-1.3.37 are not benched because of dependency issues when generating the Rust bindings. However, versions before and after are benched, so the overall trend in performance can still be seen without the data from these versions.
9793

9894
### Sample output
9995

bindings/rust/bench/aws-lc-config/rustls.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

bindings/rust/bench/aws-lc-config/s2n.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)