## Description
In progress thing for what should later be `iroh-perf`. For now you can
run with `cargo run --release -- iroh` and `cargo run --release --
quinn` to do a simple comparison benchmark.
More knobs are available for tuning with `--help`.
There's a much more stark difference on macOS compared to running on
Linux.
Next steps bumping to test against `quinn 0.11`
Sample output:
```
iroh (macOS)
Client 0 stats:
Connect time: 13.788583ms
Overall download stats:
Transferred 1073741824 bytes on 1 streams in 5.47s (187.27 MiB/s)
Time to first byte (TTFB): 1ms
Total chunks: 130319
Average chunk time: 41.936ms
Average chunk size: 8.04KiB
Stream download metrics:
│ Throughput │ Duration
──────┼───────────────┼──────────
AVG │ 187.31 MiB/s │ 5.47s
P0 │ 187.25 MiB/s │ 5.46s
P10 │ 187.37 MiB/s │ 5.47s
P50 │ 187.37 MiB/s │ 5.47s
P90 │ 187.37 MiB/s │ 5.47s
P100 │ 187.37 MiB/s │ 5.47s
```
```
quinn (macOS)
Client 0 stats:
Connect time: 1.81875ms
Overall download stats:
Transferred 1073741824 bytes on 1 streams in 2.85s (358.92 MiB/s)
Time to first byte (TTFB): 61.168ms
Total chunks: 47412
Average chunk time: 60.176ms
Average chunk size: 22.12KiB
Stream download metrics:
│ Throughput │ Duration
──────┼───────────────┼──────────
AVG │ 358.88 MiB/s │ 2.85s
P0 │ 358.75 MiB/s │ 2.85s
P10 │ 359.00 MiB/s │ 2.85s
P50 │ 359.00 MiB/s │ 2.85s
P90 │ 359.00 MiB/s │ 2.85s
P100 │ 359.00 MiB/s │ 2.85s
```
```
iroh (linux)
Client 0 stats:
Connect time: 3.83554ms
Overall download stats:
Transferred 1073741824 bytes on 1 streams in 1.16s (884.52 MiB/s)
Time to first byte (TTFB): 2.014ms
Total chunks: 38046
Average chunk time: 30.408ms
Average chunk size: 27.55KiB
Stream download metrics:
│ Throughput │ Duration
──────┼───────────────┼──────────
AVG │ 884.75 MiB/s │ 1.16s
P0 │ 884.50 MiB/s │ 1.16s
P10 │ 885.00 MiB/s │ 1.16s
P50 │ 885.00 MiB/s │ 1.16s
P90 │ 885.00 MiB/s │ 1.16s
P100 │ 885.00 MiB/s │ 1.16s
```
```
quinn (linux)
Client 0 stats:
Connect time: 1.22085ms
Overall download stats:
Transferred 1073741824 bytes on 1 streams in 994.57ms (1029.59 MiB/s)
Time to first byte (TTFB): 1.483ms
Total chunks: 32809
Average chunk time: 30.296ms
Average chunk size: 31.96KiB
Stream download metrics:
│ Throughput │ Duration
──────┼───────────────┼──────────
AVG │ 1030.50 MiB/s │ 993.00ms
P0 │ 1030.00 MiB/s │ 993.00ms
P10 │ 1031.00 MiB/s │ 993.00ms
P50 │ 1031.00 MiB/s │ 993.00ms
P90 │ 1031.00 MiB/s │ 993.00ms
P100 │ 1031.00 MiB/s │ 993.00ms
```
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
- [ ] Self-review.
- [ ] Documentation updates if relevant.
- [ ] Tests if relevant.
Bytes, Distributed.
Iroh is a protocol for syncing & moving bytes. Bytes of any size, on any device. At its core, it's a peer-2-peer network built on a magic socket that establishes QUIC connections between peers. Peers request and provide blobs of opaque bytes that are incrementally verified by their BLAKE3 hash during transfer.
Using Iroh
Iroh is delivered as a Rust library and a CLI.
Library
Run cargo add iroh, to add iroh to your project.
CLI
Check out https://iroh.computer/docs/install to get started.
The implementation lives in the iroh-cli crate.
License
Copyright 2024 N0, INC.
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.