Skip to content

Commit 502feae

Browse files
committed
update README
1 parent bc031cc commit 502feae

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
/*.py
66
.cache
77
compile_commands.json
8+
/*.p
9+
/*.data

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!--ts-->
2+
* [asyncio](#asyncio)
3+
* [Build &amp; Run](#build--run)
4+
* [Hello world](#hello-world)
5+
* [Dump callstack](#dump-callstack)
6+
* [TCP Echo](#tcp-echo)
7+
* [Client](#client)
8+
* [Server](#server)
9+
* [Benchmark](#benchmark)
10+
* [Gather](#gather)
11+
* [Tested Compiler](#tested-compiler)
12+
* [TODO](#todo)
13+
* [Reference](#reference)
14+
15+
<!-- Added by: netcan, at: Fri Dec 3 08:06:48 PM HKT 2021 -->
16+
17+
<!--te-->
18+
119
# asyncio
220
Asyncio is a C++20 coroutine library to write concurrent code using the await syntax, and imitate python asyncio library.
321

@@ -131,6 +149,21 @@ Send: 'Hello World!'
131149
Close the connection
132150
```
133151

152+
### Benchmark
153+
Using the Apache Benchmarking tool, 10000000 requests that each size is 106 byte, 1000 concurrency, enable keepalive, the QPS/RPS result below:
154+
155+
| framework | RPS [#/sec] (mean) |
156+
|----------------|--------------------:|
157+
| python asyncio | 47393.59 |
158+
| this project | **164457.63** |
159+
| epoll | 149478.83 |
160+
| libevent | 136996.46 |
161+
| libuv | 159937.73 |
162+
163+
164+
More detail see: [benchmark.md](docs/benchmark.md)
165+
166+
134167
## Gather
135168
```cpp
136169
auto factorial(std::string_view name, int number) -> Task<int> {

docs/benchmark.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# AsyncIO Eventloop benchmark
22
- Date: 2021-12-3
3+
- CommitId: bc031cc835d8da4549aebc752c3a3bda5f103012
34
- Test command: `ab -n 1000000 -c 1000 -k http://127.0.0.1:8888/`
45
- OS: Linux debian 5.15.0-1-amd64 #1 SMP Debian 5.15.3-1 (2021-11-18) x86_64 GNU/Linux
56
- CPU: AMD Ryzen 5 2600X Six-Core Processor

0 commit comments

Comments
 (0)