mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-26 16:11:02 +08:00
Add sorting to test script and calculate usec/block
This commit is contained in:
parent
dfd5c6ba4b
commit
7b21801b65
@ -12,8 +12,13 @@ ENABLED_PROF=$SUBDIR/profiler_sample
|
|||||||
TEMP_FILE_ENABLE="enable.info"
|
TEMP_FILE_ENABLE="enable.info"
|
||||||
TEMP_FILE_DISABLE="disable.info"
|
TEMP_FILE_DISABLE="disable.info"
|
||||||
RESULT_FILE="result.csv"
|
RESULT_FILE="result.csv"
|
||||||
|
RESULT_FILE_TMP="result.csv.tmp"
|
||||||
|
|
||||||
echo "Blocks count, dT prof enabled usec, dT prof disabled usec" > $RESULT_FILE
|
HEADER="Blocks count, dT prof enabled usec, dT prof disabled usec,delta, usec/block"
|
||||||
|
|
||||||
|
#echo "Blocks count, dT prof enabled usec, dT prof disabled usec,delta, usec/block" > $RESULT_FILE
|
||||||
|
|
||||||
|
rm -rf $RESULT_FILE
|
||||||
|
|
||||||
for i in {1..9}
|
for i in {1..9}
|
||||||
do
|
do
|
||||||
@ -29,14 +34,24 @@ do
|
|||||||
DT_ENA=`cat $TEMP_FILE_ENABLE | grep Elapsed| awk '{print $3}'`
|
DT_ENA=`cat $TEMP_FILE_ENABLE | grep Elapsed| awk '{print $3}'`
|
||||||
N_ENA=`cat $TEMP_FILE_ENABLE | grep Blocks| 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}'`
|
N_DIS=`cat $TEMP_FILE_DISABLE | grep Elapsed| awk '{print $3}'`
|
||||||
echo $N_ENA,$DT_ENA,$N_DIS >> $RESULT_FILE
|
|
||||||
|
DELTA=$(($DT_ENA-$N_DIS))
|
||||||
|
USEC_BLOCK=`awk "BEGIN{print $DELTA/$N_ENA}"`
|
||||||
|
|
||||||
|
echo $N_ENA,$DT_ENA,$N_DIS,$DELTA,$USEC_BLOCK >> $RESULT_FILE
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
echo $i
|
echo $i
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
cat $RESULT_FILE | sort > $RESULT_FILE_TMP
|
||||||
|
|
||||||
|
echo $HEADER > $RESULT_FILE
|
||||||
|
cat $RESULT_FILE_TMP >> $RESULT_FILE
|
||||||
|
|
||||||
rm -rf $TEMP_FILE_ENABLE
|
rm -rf $TEMP_FILE_ENABLE
|
||||||
rm -rf $TEMP_FILE_DISABLE
|
rm -rf $TEMP_FILE_DISABLE
|
||||||
|
rm -rf $RESULT_FILE_TMP
|
||||||
|
|
||||||
echo "See result in $RESULT_FILE"
|
echo "See result in $RESULT_FILE"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user