Browse Source

new: [vps] add ``bench`` action

pull/4/head
Valentin Lab 1 year ago
parent
commit
602a44d45e
  1. 14
      bin/vps

14
bin/vps

@ -2381,4 +2381,18 @@ cmdline.spec:mongo:cmd:upgrade:run() {
cmdline.spec.gnu bench
cmdline.spec::cmd:bench:run() {
depends sysbench
nbthread=$(lscpu | egrep "^CPU\(s\):" | cut -f 2 -d : | xargs echo)
single=$(sysbench cpu --cpu-max-prime=20000 run --threads=1 | grep "events per" | cut -f 2 -d : | xargs echo)
threaded=$(sysbench cpu --cpu-max-prime=20000 run --threads="$nbthread" | grep "events per" | cut -f 2 -d : | xargs echo)
echo "$threaded / $single / $nbthread"
}
cmdline::parse "$@" cmdline::parse "$@"
Loading…
Cancel
Save