60 Commits

Author SHA1 Message Date
Rüdiger Klaehn 2156ac1c30 bench: Allow configuring the runtime type in the bulk bench (#280)
* Allow configuring the runtime type in the bulk bench

Also switch the default to the multithreaded runtime. I think that is more
representative of actual use.

* fmt

* clippy

---------

Co-authored-by: Floris Bruynooghe <flub@n0.computer>
2026-03-19 08:24:04 +00:00
Friedel Ziegelmayer 294e3ea603 refactor!: rename to noq (#461)
* refactor!: rename to noq

* fixup python scripts

* fixup

* fixup

* fixup: cr
2026-02-27 14:57:21 +00:00
Dirkjan Ochtman 6cb31438bb Hoist lint configuration to the workspace level 2026-01-12 16:46:28 +01:00
Rüdiger Klaehn 8dfdc04e13 feat: Introduce UnorderedRecvStream newtype (#257)
* Introduce UnorderedRecvStream newtype and remove unordered flag from recv_chunk

The only way to do unordered reads is now via the UnorderedRecvStream.

UnorderedRecvStream duplicates the API of RecvStream related to stream state

* Fix bench

* Update quinn/src/recv_stream.rs

Co-authored-by: Floris Bruynooghe <flub@n0.computer>

* Update quinn/src/recv_stream.rs

Co-authored-by: Floris Bruynooghe <flub@n0.computer>

* Add links to docs.

* Add doc comment to UnorderedRecvStream.

* Remove IllegalOrderedRead in quinn.

We do not remove ReadableError::IllegalOrderedRead in quinn-proto, since
using the current quinn-proto API you can still get it.

So we need to panic in the (single) place where we convert a ReadableError
to a ReadError.

* Move struct definition closer to impl

---------

Co-authored-by: Floris Bruynooghe <flub@n0.computer>
2025-12-15 15:52:45 +00:00
Damien Deville 7aa7c8d79d bench: fix clap help 2025-08-22 13:28:08 +00:00
Damien Deville ce94052e3b bench: refactor parse_byte_size 2025-08-22 13:28:08 +00:00
Dirkjan Ochtman 8339ef3ccc Upgrade rcgen to 0.14 2025-07-02 19:27:49 +00:00
Dirkjan Ochtman a8807131e4 Switch to 2024 style 2025-02-23 11:52:46 +00:00
Benjamin Saunders b42e21e74d Make SendStream::finish synchronous
`await`ing on this was error-prone and not very useful, since it gave
little insight into application state, and was redundant to `stopped`.
2024-05-03 11:52:44 -07:00
Dirkjan Ochtman e6d48970af proto: validate ClientConfig crypto provider
Co-authored-by: gabrik <gabriele.baldoni@gmail.com>
2024-04-22 09:45:53 +02:00
Dirkjan Ochtman 3be1ab5ab2 Upgrade to rcgen 0.13 2024-04-22 09:45:53 +02:00
Dirkjan Ochtman a85a4c12ee Update rustls to 0.23 and ring to 0.17 2024-04-22 09:45:53 +02:00
Benjamin Saunders d51b630fcd Add client/server spans to bulk benchmark 2023-09-02 22:30:11 -07:00
Benjamin Saunders 7442da16f9 Enable ACK frequency extension in bulk benchmark 2023-09-02 22:30:11 -07:00
Benjamin Saunders 044eab53ff Update clap 2023-05-11 14:10:19 +02:00
Benjamin Saunders 092a7686a4 Enable PMTUD by default when appropriate 2023-05-06 08:05:17 +02:00
Adolfo Ochagavía 030a0e8d72 Use mtu instead of max_udp_payload_size in names
Sponsored by Stormshield
2023-05-03 09:29:12 +02:00
Adolfo Ochagavía 2d48482180 Use PLPMTUD in bench, perf and examples
Sponsored by Stormshield
2023-04-04 17:40:20 -07:00
Dirkjan Ochtman 3cc7efbe55 Apply remaining clippy suggestions from clippy 1.67 2023-02-27 07:34:35 +01:00
Dirkjan Ochtman f7354ef6ac Inline format arguments 2023-02-27 07:34:35 +01:00
Dirkjan Ochtman 2c6aa43610 Apply clippy suggestions from Rust 1.66 2022-12-19 10:13:01 -08:00
Benjamin Saunders 5c7f7aabfa Allow initial MTU to be specified in bulk benchmark 2022-11-27 21:23:24 -08:00
Benjamin Saunders 7d51d2e57e Remove Incoming stream in favor of Endpoint::accept 2022-10-23 08:18:42 +02:00
Benjamin Saunders 6e4bcbb2fc Drop NewConnection in favor of simpler API 2022-09-27 11:08:26 +02:00
Benjamin Saunders fe93a68108 Replace structopt with its successor, clap 3 2022-07-03 21:02:33 +02:00
matszpk 1d7aa4311d Fixes on bench lib for 32-bit platforms. 2022-06-10 10:17:36 -07:00
Benjamin Saunders c1bd43f3a6 Satisfy clippy 2022-04-08 17:51:22 +02:00
Dirkjan Ochtman 838ad7c471 config: make ClientConfig fields private 2022-02-27 11:03:31 -08:00
Benjamin Saunders b2c24d957a Drop futures-util dep from benchmarking tools 2021-12-29 07:34:22 +01:00
Dirkjan Ochtman ee6bbf1d2a Fix clippy suggestions from 1.57 2021-12-10 10:29:12 -08:00
Benjamin Saunders 1159ae3c65 Non-exhaustive ClientConfig 2021-11-10 11:25:19 +01:00
Benjamin Saunders b923c4c8b0 Pass SocketAddr by value
We always consume this by value in the end, and it's a little more
ergonomic.
2021-10-29 20:12:45 +02:00
Benjamin Saunders 5d1b6a101b Remove EndpointBuilder
Now that rustls configuration is more straightforward, this is not
adding significant value.
2021-10-29 20:12:45 +02:00
Benjamin Saunders 495d2927cb Remove certificate newtypes 2021-10-29 08:02:13 +02:00
Dirkjan Ochtman 9daaa15da2 Upgrade to rustls 0.20 2021-10-26 11:05:30 -07:00
Dirkjan Ochtman fed3c5cb39 Require explicit construction of ServerConfigs 2021-09-29 10:12:44 -07:00
Dirkjan Ochtman a7efd92044 Require explicit construction of ClientConfigs 2021-09-29 10:12:44 -07:00
Matthias Einwag 8899b1a57b Allow multiple clients in the bulk benchmark
This allows to specify a "--client" parameter in the benchmark,
which specifies the amount of clients which perform a  test concurrently.
Each client uses its own thread and single-threaded runtime.

Stats are currently printed for each individual client and not aggregated.
2021-09-20 21:49:48 +02:00
Matthias Einwag 074da13c4b Allow to specify units for the bulk benchmark
This makes it a bit easier to specify large arguments
2021-09-20 21:49:48 +02:00
Matthias Einwag 8408135208 Allow bulk benchmark in both directions
This changes the bulk benchmark to support server->client
in addition to client->server transfers.

The default direction is set to server->client, since
this is more typically used.
2021-09-20 21:49:48 +02:00
Matthias Einwag 3ac0a05313 Restructure bulk benchmarks
In order to extend the bulk benchmark further, this change moves most
common functions out of the bulk.rs binary and into a lib.rs and stats.rs file.

Functionally there are no relevant changes.
2021-09-20 21:49:48 +02:00
Chris Connelly e63dd77376 Make TransportConfig setters infallible
For most setters this was just a case of changing the signature to take
a `VarInt`.

`max_idle_timeout` was a bit more involved in order to maintain a usable
conversion from `Duration`. The internal representation was changed from
`Duration` from `VarInt`, and an `IdleTimeout` newtype was introduced
for the setter signature. `IdleTimeout` contains a `VarInt`-encoded
millisecond value, and has a fallible conversion from `Duration`. The
use of a newtype is preferable to a direct `Duration` -> `VarInt`
encoding since there could be other `VarInt`-encoded values in future
that use a different resolution than milliseconds.

These changes allow callers to avoid the type-level possibility of error
if they have a `VarInt` (or a value that can be converted infallibly
into one). Fallible conversion from `VarInt` is still convenient with
`TryInto`, and callers can handle the conversion errors without the
indirection of `ConfigError`.

Closes #1176.

BREAKING CHANGE: The `max_concurrent_bidi_streams`,
`max_concurrent_uni_streams`, `stream_receive_window`, and
`receive_window` methods on `TransportConfig` now take `VarInt`
arguments and return `&mut Self`. `TransportConfig::max_idle_timeout`
now takes an `IdleTimeout` argument and returns `&mut Self`.
2021-09-19 18:30:43 -07:00
Marcel Märtens b224d1d0fa switch to futures_utils in tests and benches, also use futures_utils isntead of futures_core 2021-08-11 10:27:32 +02:00
Benjamin Saunders 1082c13167 Idiomatic capitalization of CipherSuite variants 2021-03-26 20:13:33 +01:00
Matthias Einwag 270016a1da Use owned buffer API for sending data in the bulk test
This avoids the allocation inside the the connection Mutex.
2021-03-02 06:49:34 +01:00
Matthias Einwag 80376ff305 Allow to specify the cipher suite in bulk test
rustls defaults to CHACHA20, which is rather slow on desktop hardware.
This change allows to specify a single cipher suite for this test, and
sets the default to AES128.

CHACHA20 (default):
> Sent 4294967296 bytes on 1 streams in 14.86s (275.68 MiB/s)

AES128:
> Sent 4294967296 bytes on 1 streams in 12.21s (335.59 MiB/s)
2021-02-16 19:14:36 +01:00
Matthias Einwag ff542299c4 Allow to use the vectored ordered read API in benchmark
This extends the benchmark to make the consumer either utilize the
ordered or unordered read API.
The ordered read API is now set to the default, since it might be
applicable to more applications.
2021-02-05 10:14:57 +01:00
Dirkjan Ochtman a280b7770f quinn: unify ordered and unordered read APIs 2021-01-30 10:09:09 +01:00
Dirkjan Ochtman 51685fb760 Upgrade to tokio 1, bytes 1 and rustls 0.19 2021-01-25 08:53:00 +01:00
Benjamin Saunders 1e5a538221 Limit concurrent streams rather than accept queue size
Previously, we limited the number of streams that could be opened by
the peer but not `accept`ed by the application. However, to guarantee
bounded resource use, applications will typically want to limit the
number of streams they process concurrently. While this could
be *approximately* implemented at the application layer by controlling
calls to accept, that approach has a significant drawback: If streams
are slow to process, the worst-case per-stream latency observed by a
peer who opens the maximum number of streams can be arbitrarily bad,
because streams may be opened above the limit the local application is
willing to process. Reducing the number of unaccepted streams
tolerated can reduce the proportion of streams affected, but reducing
it too low will increase the number of round trips required to open
any given number of streams, increasing average latency significantly.

As a side benefit, this reduces the effort needed for applications to
limit concurrency to a fixed quantity, which is expected to be the
overwhelmingly common case. Should a use case for dynamic concurrency
limits arise, we can expose a setter.
2021-01-22 11:39:00 -08:00