diff options
| author | Shinya Sato <shinnya.sato@gmail.com> | 2022-03-03 21:12:55 +0900 |
|---|---|---|
| committer | Shinya Sato <shinnya.sato@gmail.com> | 2022-03-03 21:12:55 +0900 |
| commit | f19a057cfcfd77c5567ff8d536db84a40037f10d (patch) | |
| tree | f661d617e12dcf695fde6eb3c3cc330354e1ce97 /comparison/tools/sptest_commands.sh~ | |
| parent | c0efadbf4003cead718d09a887cff05103f3c377 (diff) | |
| download | inpla-f19a057cfcfd77c5567ff8d536db84a40037f10d.tar.gz inpla-f19a057cfcfd77c5567ff8d536db84a40037f10d.zip | |
v0.8.1
Diffstat (limited to 'comparison/tools/sptest_commands.sh~')
| -rw-r--r-- | comparison/tools/sptest_commands.sh~ | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/comparison/tools/sptest_commands.sh~ b/comparison/tools/sptest_commands.sh~ deleted file mode 100644 index 0451c4e..0000000 --- a/comparison/tools/sptest_commands.sh~ +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -# $1: name list of commands -# ex: ./sptest_commands.sh fib38 bsort-40000 - - -# repeat and waittimes -ct=10 -waittime=5 - -# etc -log="log.txt" - -# ------------------------------------------------- -function gettime() { - rm -f _result.txt - for ((i=1; i<ct; i++)) - do - (time $1) 2>> _result.txt - echo - echo "Done ($i/$ct)" - sleep $waittime - echo 'Restart' - done - (time $1) 2>> _result.txt - echo - echo - logtime=`grep real _result.txt | awk -F'\t' '{print $2}' | cut -c3- | awk -F's' '{print $1}'` - echo "Execution times" - echo "$logtime" - res=`echo "$logtime\n" | awk 'BEGIN{r=0;c=0} {r=r+$0;c++} END{print r/c}'` - - # for return value - res=`grep real _result.txt | awk -F'\t' '{print $2}' | cut -c3- | awk -F's' '{print $1}' | awk 'BEGIN{r=0;c=0} {r=r+$0;c++} END{print r/c}'` - rm -f _result.txt -} - - -rm -f $log - -echo '' >> $log -echo "$ct" | awk -F',' '{printf("%-27s| avg. time over %d runs (sec)\n","",$1)}' >> $log -echo '===========================+=============================' >> $log - -for f in "$@"; do - command="$f" - echo 'Now just cooling CPU...' - sleep $waittime - echo 'The experimental was started.' - echo "------------------" - echo "$f" - gettime "./$f" - echo "Average ${res}sec" - echo "$command,$res" | awk -F',' '{printf("%-27s| %.2f\n",$1,$2)}' >> $log -done - -echo -cat $log - |
