0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 08:41:02 +08:00

43 lines
1.1 KiB
Bash
Raw Normal View History

2016-02-18 23:52:28 +03:00
#!/bin/bash
2016-08-01 22:25:26 +03:00
unamestr=`uname`
SUBDIR="./bin"
if [[ ! "$unamestr" == 'Linux' ]]; then
SUBDIR="./bin/Release/"
fi
2016-02-18 23:52:28 +03:00
2016-08-01 22:25:26 +03:00
DISABLED_PROF=$SUBDIR/profiler_sample_disabled_profiler
ENABLED_PROF=$SUBDIR/profiler_sample
2016-02-18 23:52:28 +03:00
2016-08-01 22:25:26 +03:00
TEMP_FILE_ENABLE="enable.info"
TEMP_FILE_DISABLE="disable.info"
RESULT_FILE="result.csv"
echo "Blocks count, dT prof enabled usec, dT prof disabled usec" > $RESULT_FILE
for i in {1..9}
2016-02-18 23:52:28 +03:00
do
2016-08-10 22:38:55 +03:00
OBJECTS_COUNT=$(($i*10))
2016-08-01 22:25:26 +03:00
for j in {10..15}
do
2016-08-10 22:38:55 +03:00
RENDER_COUNT=$(($j*100))
2016-08-01 22:25:26 +03:00
for k in {10..15}
do
2016-08-10 22:38:55 +03:00
MODELLING_COUNT=$(($k*100))
2016-08-01 22:25:26 +03:00
$ENABLED_PROF $OBJECTS_COUNT $RENDER_COUNT $MODELLING_COUNT > $TEMP_FILE_ENABLE
$DISABLED_PROF $OBJECTS_COUNT $RENDER_COUNT $MODELLING_COUNT > $TEMP_FILE_DISABLE
DT_ENA=`cat $TEMP_FILE_ENABLE | grep Elapsed| awk '{print $3}'`
N_ENA=`cat $TEMP_FILE_ENABLE | grep Blocks| awk '{print $3}'`
N_DIS=`cat $TEMP_FILE_DISABLE | grep Elapsed| awk '{print $3}'`
echo $N_ENA,$DT_ENA,$N_DIS >> $RESULT_FILE
done
done
2016-08-10 22:38:55 +03:00
echo $i
2016-08-01 22:25:26 +03:00
2016-02-18 23:52:28 +03:00
done
2016-08-01 22:25:26 +03:00
rm -rf $TEMP_FILE_ENABLE
rm -rf $TEMP_FILE_DISABLE
2016-02-18 23:52:28 +03:00
2016-08-01 22:25:26 +03:00
echo "See result in $RESULT_FILE"