1
0
Fork 0
forked from soccera/rdo

Add benchmarks to the README.md

I myself was astonished by the difference between rdo
and doas, so I felt like including it in the README.
This commit is contained in:
sw1tchbl4d3 2021-07-29 18:38:33 +02:00
parent 5bc96bc7f4
commit c692d9d9c9

View file

@ -44,3 +44,39 @@ session_ttl=5
### Dependencies
- `libbsd`
### Benchmarks
The benchmark: Execute `whoami` 1000 times.
|Program|Time|
--- | ---
sudo | 13.62s
opendoas | 7.60s
rdo | 2.25s
Baseline | 1.43s
Baseline here is how long it took without any wrapper to make it root.
These benchmarks were done on a single core of an `Intel i3-3110M` Laptop processor, on Artix Linux version `5.13.4-zen2-1-zen`.
`sudo` and `opendoas` were pulled from the pacman repos, rdo via AUR.
All configs were kept as default, except allow the `wheel` group on both + enable `persist` on doas.
Script used:
```sh
#!/bin/sh
$1 whoami
current=$(date +%s.%N)
for i in {1..1000}; do
$1 whoami 2>&1 >/dev/null
done
done=$(date +%s.%N)
echo $done - $current | bc
```
The script requires `bc` to be installed, for floating point arithmetics.