diff --git a/README.md b/README.md index ae0243b..7d6cac9 100644 --- a/README.md +++ b/README.md @@ -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.