Skip to content

Commit

Permalink
integrate rbench
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmyczko authored Sep 19, 2022
1 parent 306e8ff commit da5e177
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion ruptime
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,21 @@ done)
u=$(printf "%-28s %s\n" "$k" "$biosdate $cores $mem" | mcrypt -f "$KEY" -Fq | base64 -w0)
;;
rbench)
u=$(printf "%-28s %s\n" "$k" "`/usr/lib/ruptime/benchmark`" | mcrypt -f "$KEY" -Fq | base64 -w0)
dt=date
which gdate >/dev/null && dt=$(which gdate)
which free >/dev/null && m=$(free -b |grep ^Mem: |awk '{printf "%.0f\n", $2/1024/1024/1024}')
which free >/dev/null || m=$(sysctl -n hw.memsize|awk '{printf "%.0f\n", $1/1024/1024/1024}')
start=$($dt +%s.%N)
memtester 16M 1 &>/dev/null
end=$($dt +%s.%N)
mem=$(printf "MEM %.2f %s GB" $(echo $end - $start | bc) $m)
arch=$(uname -m)
cores=$(getconf _NPROCESSORS_ONLN)
start2=$($dt +%s.%N)
/bin/echo "scale=3000;4*a(1)" | bc -l &>/dev/null
end2=$($dt +%s.%N)
cpu=$(printf "CPU %.2f %s\n" $(echo $end2 - $start2 | bc) $cores)
u=$(printf "%-28s %s\n" "$k" "$mem $cpu" | mcrypt -f "$KEY" -Fq | base64 -w0)
;;
rboot)
r=0
Expand Down

0 comments on commit da5e177

Please sign in to comment.