diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-16 14:40:28 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-10 22:39:56 +0100 |
commit | 751a86f53e588fdcc317bace102d5a57b69835fd (patch) | |
tree | 342dc6b70d867dbd34e2ef01d4de72411d3986d5 | |
parent | ce0d4b58dce8f18c5f4c1011949fd7d2c67e414b (diff) |
loperf: Do not log each loperf run. Removes commented out regression checking.
It does not make much sense to report individual performance regressions.
Instead this script produces history file with all runs, so you can draw
nice graphs with it.
-rwxr-xr-x | loperf/loperf.sh | 30 | ||||
-rwxr-xr-x | loperf/utls.sh | 69 |
2 files changed, 0 insertions, 99 deletions
diff --git a/loperf/loperf.sh b/loperf/loperf.sh index e302972..6a35ab4 100755 --- a/loperf/loperf.sh +++ b/loperf/loperf.sh @@ -52,13 +52,11 @@ LOVERSION="$(get_lo_version "$OFFICEBIN")" DT=$(echo "$TESTDATE" | tr -s '\ \+\-\:' "_") CG_LOG="logs/callgrind/cg-lo-$DT-$LOVERSION" -PF_LOG="logs/loperf/pf-lo-$DT-$LOVERSION.log" ERR_LOG="logs/error.log" CSV_LOG_DIR="logs/csv/" CSV_HISTORY="logs/history.csv" mkdir -p logs/callgrind > /dev/null 2>&1 -mkdir -p logs/loperf > /dev/null 2>&1 mkdir -p "$CSV_LOG_DIR" > /dev/null 2>&1 test -f "$CSV_HISTORY" || echo -e "time,git-commit,offload$(ls $DOCUMENTSDIR/* | sed s%$DOCUMENTSDIR/%,%g | tr -d '\n')" > "$CSV_HISTORY" @@ -113,14 +111,6 @@ CEst=$(expr ${offload[0]} + 10 \* $(expr ${offload[12]} + ${offload[10]}) + 10 \ echo $'\t'$CEst >> "$CSV_FN" echo -n "$TESTDATE","$LOVERSION",$CEst >> "$CSV_HISTORY" -# Populate offload to PF_LOG -echo " Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw Bc Bcm Bi Bim Ge" | tee -a "$PF_LOG" -echo "########################################################" | tee -a "$PF_LOG" -echo | tee -a "$PF_LOG" -echo "Offload:" | tee -a "$PF_LOG" -echo "$offload_str" | tee -a "$PF_LOG" -echo | tee -a "$PF_LOG" - # Loaded launch one by one echo "Start onload pvt..." find $DOCUMENTSDIR -type f | grep -Ev "\/\." | while read f; do @@ -146,15 +136,6 @@ find $DOCUMENTSDIR -type f | grep -Ev "\/\." | while read f; do onload_str=$(grep '^summary:' "$cur_log" | sed s/"summary: "//) onload=($onload_str) if test -n "$GZIP"; then gzip "$cur_log" > /dev/null 2>&1; fi - # Populate onload to PF_LOG - echo "Load: $f" | tee -a "$PF_LOG" - echo "$onload_str" | tee -a "$PF_LOG" - - # Populate onload delta to PF_LOG - for i in $(seq 0 13); do - onload_delta[$i]=$(expr ${onload[$i]} - ${offload[$i]}) - echo -n ${onload_delta[$i]} " " | tee -a "$PF_LOG" - done #Construct the csv file name CSV_FN="$CSV_LOG_DIR"/"onload-${f#$DOCUMENTSDIR\/}".csv @@ -171,20 +152,9 @@ find $DOCUMENTSDIR -type f | grep -Ev "\/\." | while read f; do echo $'\t'$CEst >> "$CSV_FN" echo -n ",$CEst" >> "$CSV_HISTORY" - echo | tee -a "$PF_LOG" - echo | tee -a "$PF_LOG" - done echo "" >> "$CSV_HISTORY" $OFFICEBIN --headless --convert-to fods --outdir logs "$CSV_HISTORY" # Clean old callgrind files find "logs/callgrind" -type f -mtime +10 -exec rm {} \; - -# Regression check -# echo "Regression Status:" | tee -a "$PF_LOG" -# echo "-----------------" | tee -a "$PF_LOG" -# find $(dirname $(readlink -f "$PF_LOG")) -type f | grep -v "$PF_LOG" | grep log$ | while read rf; do -# check_regression "$PF_LOG" "$rf" | tee -a "$PF_LOG" -# done -# grep '^Regression found!$' "$PF_LOG" > /dev/null || echo "Congratulations, no regression found!" | tee -a "$PF_LOG" diff --git a/loperf/utls.sh b/loperf/utls.sh index 41bb1a0..9e0d2a7 100755 --- a/loperf/utls.sh +++ b/loperf/utls.sh @@ -45,75 +45,6 @@ function get_lo_version { } -function is_delta_regress { - # input two arrays and return an array of regression or 1 - - a1=($1) - a2=($2) - - if test ${#a1[@]} -eq ${#a2[@]}; then - for i in $(seq 0 $(expr ${#a2[@]} - 1)); do - arr_result[$i]=$(expr ${a1[$i]} - ${a2[$i]}) - done - - if [ ${arr_result[0]} -gt 0 ] && [ ${arr_result[3]} -gt 0 ] && [ ${arr_result[6]} -gt 0 ]; then - echo -n ${arr_result[@]} - return 0 - else - return 2 - fi - else - echo "Error: log files format is probably not consistent." - return 1 - fi - - echo "Error: Something was wrong when checking regression" - return 1 - -} - -# compare two logs $1 and $2 side by side -function check_regression { - - # check if logfile $1 has regression against logfile $2 - # append the regression stat in PF_LOG - - grep 'Reg:' "$1" > /dev/null && echo "Warning: Regression status already in $1" - - # find offload regression - - # find onload regression - - i=0 - grep "^Load:" "$1" > /tmp/$$ - while read fn; do - arr_onload_files[$i]="$fn" - let i=i+1 - done< "/tmp/$$" - - arr_onload_files_lens=${#arr_onload_files[@]} - - for j in $(seq 0 $(expr $arr_onload_files_lens - 1)); do - - delta1="$(grep -A2 "${arr_onload_files[$j]}" "$1" | tail -n1)" - delta2="$(grep -A2 "${arr_onload_files[$j]}" "$2" | tail -n1)" - - r=$(is_delta_regress "$delta1" "$delta2") - - if test $? -eq 0; then - echo "Regression found!" - echo "Document : ${arr_onload_files[$j]#Load: }" - echo "Reference: $2" - echo "Diffstats: $r" - echo "--------------------------------------" - return 0 - fi - - done - - return 1 -} - # A lovely script to compare versions from fgm/stackoverflow:) # http://stackoverflow.com/questions/3511006/how-to-compare-versions-of-some-products-in-unix-shell |