|
2 | 2 |
|
3 | 3 | ## Publish-Subscribe
|
4 | 4 |
|
5 |
| -The benchmark quantifies the latency between a publisher sending a message and |
6 |
| -a subscriber receiving it. In the setup, a bidirectional connection is |
| 5 | +The benchmark quantifies the latency between a `Publisher` sending a message and |
| 6 | +a `Subscriber` receiving it. In the setup, a bidirectional connection is |
7 | 7 | established from process `a` to `b` (service name `a2b`) and back
|
8 |
| -(service name `b2a`). Subscribers employ multithreaded busy waiting and promptly |
| 8 | +(service name `b2a`). `Subscriber`s employ multithreaded busy waiting and promptly |
9 | 9 | respond upon message reception. This process repeats `n` times, and the average
|
10 | 10 | latency is subsequently computed.
|
11 | 11 |
|
12 | 12 | ```sh
|
13 |
| -cargo run --release benchmark-publish-subscribe -- --bench-all |
| 13 | +cargo run --bin benchmark-publish-subscribe --release -- --bench-all |
14 | 14 | ```
|
15 | 15 |
|
16 | 16 | For more benchmark configuration details, see
|
17 | 17 |
|
18 | 18 | ```sh
|
19 |
| -cargo run --release benchmark-publish-subscribe -- --help |
| 19 | +cargo run --bin benchmark-publish-subscribe --release -- --help |
| 20 | +``` |
| 21 | + |
| 22 | +## Event |
| 23 | + |
| 24 | +The event quantifies the latency between a `Notifier` sending a notification and |
| 25 | +a `Listener` waking up from and responding to it. In the setup, a bidirectional connection is |
| 26 | +established from process `a` to `b` (service name `a2b`) and back |
| 27 | +(service name `b2a`). The `Listener` employs a blocking wait and wakes up on signal |
| 28 | +reception to promptly respond with a return signal notification. This process repeats `n` |
| 29 | +times, and the average latency is subsequently computed. |
| 30 | + |
| 31 | +```sh |
| 32 | +cargo run --bin benchmark-event --release -- -i 10000 |
| 33 | +``` |
| 34 | + |
| 35 | +For more benchmark configuration details, see |
| 36 | + |
| 37 | +```sh |
| 38 | +cargo run --bin benchmark-event --release -- --help |
20 | 39 | ```
|
0 commit comments