https://github.com/jgaa/asio-async-model-perftest
Performance test to measure the relative performance between asio's different async handlers
https://github.com/jgaa/asio-async-model-perftest
asio asynchronous-programming cpp20 performance-testing
Last synced: about 1 month ago
JSON representation
Performance test to measure the relative performance between asio's different async handlers
- Host: GitHub
- URL: https://github.com/jgaa/asio-async-model-perftest
- Owner: jgaa
- License: mit
- Created: 2021-05-15T14:51:40.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-30T08:30:14.000Z (about 2 years ago)
- Last Synced: 2025-04-19T16:11:47.590Z (about 2 months ago)
- Topics: asio, asynchronous-programming, cpp20, performance-testing
- Language: C++
- Homepage:
- Size: 25.4 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# asio-async-model-perftest
Performance test to measure the relative performance between asio's different async handlersThis project implements a simple async server work-flow
that "reads" a number of input buffers, process the data and
then "writes" a number of output buffers.In other words, we aim to simulate typical memory usage of a server application - draining the CPU cache.
The same logic is implemented using:
- Asio async methods with completion callbacks
- Asio stackful coroutines (via `spawn()`)
- Asio legacy stackless coroutines
- Asio stackless C++ 20 coroutines (via `co_spawn()`)The motivation is to measure the performance regression using the
more convenient methods, like stateful coroutines or C++ 20 coroutines.In addition, the test provides implementations of layered C++20 generators, using
lazy fetching/flushing of data at the lowest layer. This test is implemented for:- Asio stackful coroutines (via `spawn()`)
- Asio stackless C++ 20 coroutines (via `co_spawn()`)# Requirements
- gcc 11 or newer
- Boost 1.76.0 or newer (1.81 is broken, 1.82 works).# Status
In progress. Once done, I will post results and graphs with results from a
number of hardware configurations.# Run all tests:
Example on how to run all the performance-tests.
From the build/bin directory with boost in `/opt/boost/boost_1_82_0`:
```sh
LD_LIBRARY_PATH=/opt/boost/boost_1_82_0/stage/lib PATH="$PATH:." bash ~/src/asio-async-model-perftest/run-all.sh```