diff options
| author | Tyge Løvset <[email protected]> | 2021-10-02 14:11:14 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-10-02 14:11:14 +0200 |
| commit | 882e173a2cc9a09c3a96a330f981daa11e34e0d0 (patch) | |
| tree | ee085f16eb3caf62a955ef994bd9a7939b9bc4dd | |
| parent | 67f49709f60ce063b6a1c84364232d19eb71f800 (diff) | |
| download | STC-modified-882e173a2cc9a09c3a96a330f981daa11e34e0d0.tar.gz STC-modified-882e173a2cc9a09c3a96a330f981daa11e34e0d0.zip | |
Updated benchmark scripts.
| -rw-r--r-- | benchmarks/plot.py | 9 | ||||
| -rw-r--r-- | benchmarks/run_all.bat | 2 | ||||
| -rw-r--r-- | benchmarks/run_all.sh | 4 | ||||
| -rw-r--r-- | benchmarks/run_clang.sh | 2 |
4 files changed, 12 insertions, 5 deletions
diff --git a/benchmarks/plot.py b/benchmarks/plot.py index bd386312..ea3871f4 100644 --- a/benchmarks/plot.py +++ b/benchmarks/plot.py @@ -1,13 +1,16 @@ +import sys
import seaborn as sns
import pandas as pd
import matplotlib.pyplot as plt
#sns.set_theme(style="whitegrid")
comp = ['All compilers', 'Mingw-g++-10.30', 'Win-Clang-12', 'VC-19.28']
-n = 3
-df = pd.read_csv('plot_perf.csv')
+n = int(sys.argv[1]) if len(sys.argv) > 1 else 0
+file = sys.argv[2] if len(sys.argv) > 2 else 'plot_win.csv'
+df = pd.read_csv(file)
df = df[df.Method != 'total']
-if n > 0: df = df[df.Compiler == comp[n]]
+if n > 0:
+ df = df[df.Compiler == comp[n]]
g = sns.catplot(data=df, x='Method', y='Seconds', hue='Library', col='C', kind='bar',
ci=68, legend=False, col_wrap=2, sharex=False, aspect=1.4, height=3.1)
diff --git a/benchmarks/run_all.bat b/benchmarks/run_all.bat index 8f250871..2edd0a1e 100644 --- a/benchmarks/run_all.bat +++ b/benchmarks/run_all.bat @@ -1,4 +1,4 @@ -set out=plot_perf.csv +set out=plot_win.csv echo Compiler,Library,C,Method,Seconds,Ratio> %out% sh run_gcc.sh >> %out% sh run_clang.sh >> %out% diff --git a/benchmarks/run_all.sh b/benchmarks/run_all.sh new file mode 100644 index 00000000..f15a5881 --- /dev/null +++ b/benchmarks/run_all.sh @@ -0,0 +1,4 @@ +out="plot_linux.csv" +echo "Compiler,Library,C,Method,Seconds,Ratio"> $out +sh run_gcc.sh >> $out +sh run_clang.sh >> $out diff --git a/benchmarks/run_clang.sh b/benchmarks/run_clang.sh index f7575882..ae19486e 100644 --- a/benchmarks/run_clang.sh +++ b/benchmarks/run_clang.sh @@ -1,5 +1,5 @@ exe='' -if [ "$OS" == 'Windows_NT' ]; then exe='.exe'; fi +if [ "$OS" = "Windows_NT" ] ; then exe=".exe" ; fi clang++ -I../include -O3 -o cdeq_benchmark$exe cdeq_benchmark.cpp clang++ -I../include -O3 -o clist_benchmark$exe clist_benchmark.cpp clang++ -I../include -O3 -o cmap_benchmark$exe cmap_benchmark.cpp |
