Add sources

This commit is contained in:
Nikolay Puzanov
2023-06-11 16:15:40 +03:00
parent 82f90610fb
commit 686d12bf81
48 changed files with 23261 additions and 0 deletions

45
run.sh Executable file
View File

@@ -0,0 +1,45 @@
#!/usr/bin/env bash
set -e
BUILD=__build.sh
RUN=__run.sh
if [ -n "$1" ]
then
tests=$1
else
tests=$(ls -1d test-*)
fi
echo >> results.txt
echo "---------- Simulator's benchmark -----------" >> results.txt
echo $(date) >> results.txt
echo >> results.txt
for test_dir in $tests
do
if [ ! -d "$test_dir" ]
then
echo "Directory $test_dit is not exists. Break"
exit -1
fi
if [ -e $test_dir/$BUILD -a -e $test_dir/$RUN ]
then
echo "#### Run benchmark in $test_dir"
cd $test_dir
./$BUILD
start_ms=$(date +%s%N | cut -b1-13)
./$RUN
stop_ms=$(date +%s%N | cut -b1-13)
cd ..
ms=$(expr $stop_ms - $start_ms)
echo "#### $test_dir: $ms milliseconds"
echo
echo "$test_dir: $ms" >> results.txt
else
echo "Skip $test_dir directory"
fi
done