-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbenchmark_single_core.sh
executable file
·44 lines (38 loc) · 1.36 KB
/
benchmark_single_core.sh
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 -
#===============================================================================
#
# FILE: benchmark_single_core.sh
#
# USAGE: ./benchmark_single_core.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Dilawar Singh (), [email protected]
# ORGANIZATION: NCBS Bangalore
# CREATED: Saturday 31 March 2018 10:03:27 IST
# REVISION: ---
#===============================================================================
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
set -o nounset # Treat unset variables as an error
set -x -e
# This is from https://gist.github.com/joakimk/3965517
echo 'int main() { double i=0;for(i=0;i<5000000000;i++) {20%7 * i; }}' > \
/tmp/test.c && gcc -O3 /tmp/test.c -o /tmp/test \
&& time /tmp/test && rm /tmp/test.c && rm /tmp/test
echo "[INFO] Running stress-ng"
stress-ng --cpu 4 --cpu-method matrixprod --metrics-brief --perf -t 60
echo "[INFO] Execute phoronix test suite by yourself"
#if [ ! -d phoronix-test-suite ]; then
# git clone --depth 10 https://github.com/phoronix-test-suite/phoronix-test-suite
#fi
#(
# cd ./phoronix-test-suite
# sudo bash -c ./install-sh
#)
# phoronix-test-suite batch-setup
python2 $SCRIPT_DIR/test_scipy.py
python3 $SCRIPT_DIR/test_scipy.py