summaryrefslogtreecommitdiff
path: root/test/just_bench.sh
blob: 2ae7698e26b6042f18dacf8ae309fb5fd9fad11b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash

#
# bash just_bench.sh >whatever.conf
#
# hardinfo PR instructions:
# crudini --merge ../data/benchmark.conf < whatever.conf
# git checkout -b br_whatever
# git add ../data/benchmark.conf
# git commit -m "bench_result: whatever"
# git push -u <github_fork_origin> br_whatever
# https://github.com/lpereira/hardinfo/pulls

USER_NOTE="$1"

do_hi_bench() {
    sleep 1
    echo "[$1]"
    if [ "$USER_NOTE" != "" ]; then
        hardinfo -b "$1" -g conf -u "$USER_NOTE"
    else
        hardinfo -b "$1" -g conf
    fi
}

if [ ! -z `which sysbench` ]; then
    do_hi_bench "SysBench CPU (Single-thread)"
    do_hi_bench "SysBench CPU (Multi-thread)"
    #do_hi_bench "SysBench CPU (Four threads)"
    do_hi_bench "SysBench Memory (Single-thread)"
    #do_hi_bench "SysBench Memory (Two threads)"
    do_hi_bench "SysBench Memory"
fi

do_hi_bench "CPU Blowfish (Single-thread)"
do_hi_bench "CPU Blowfish (Multi-thread)"
do_hi_bench "CPU Blowfish (Multi-core)"
do_hi_bench "CPU CryptoHash"
do_hi_bench "CPU Fibonacci"
do_hi_bench "CPU N-Queens"
do_hi_bench "CPU Zlib"
do_hi_bench "FPU FFT"
do_hi_bench "FPU Raytracing"
#do_hi_bench "GPU Drawing"