[Libreoffice-commits] buildbot.git: 3 commits - loperf/loperf.sh

Matúš Kukan matus.kukan at collabora.com
Mon Mar 17 12:46:30 PDT 2014


 loperf/loperf.sh |   47 ++++++++++++++++++++++++++++++++---------------
 1 file changed, 32 insertions(+), 15 deletions(-)

New commits:
commit 4604b5f717805bee981149cb2b58c41ecedd6278
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Mon Mar 17 19:42:48 2014 +0100

    loperf: Print smaller numbers into history file.

diff --git a/loperf/loperf.sh b/loperf/loperf.sh
index 4ee5f6d..aefd35d 100755
--- a/loperf/loperf.sh
+++ b/loperf/loperf.sh
@@ -124,7 +124,7 @@ function write_data {
     # CEst = Ir + 10 Bm + 10 L1m + 20 Ge + 100 L2m + 100 LLm
     CEst=$(expr ${data[0]} + 10 \* $(expr ${data[12]} + ${data[10]}) + 10 \* $(expr ${data[3]} + ${data[4]} + ${data[5]}) + 20 \* ${data[13]} + 100 \* $(expr ${data[6]} + ${data[7]} + ${data[8]}))
     echo $'\t'$CEst >> "$CSV_FN"
-    echo -n ",$CEst" >> "$CSV_HISTORY"
+    echo -n ",$(expr ${CEst} / 1000000)" >> "$CSV_HISTORY"
 }
 
 # Do a clean launch
commit ed5a94f515c9cc021eb7656981c8b406615617dd
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Mon Mar 17 16:45:11 2014 +0100

    loperf: Test plain load of documents separately and then convert them.

diff --git a/loperf/loperf.sh b/loperf/loperf.sh
index 880d5a8..4ee5f6d 100755
--- a/loperf/loperf.sh
+++ b/loperf/loperf.sh
@@ -58,21 +58,29 @@ CSV_HISTORY="logs/history.csv"
 
 mkdir -p logs/callgrind > /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"
+test -f "$CSV_HISTORY" || echo "time,git-commit,offload-first,offload-second$(ls ${DOCUMENTSDIR}/* | sed "s%${DOCUMENTSDIR}/% %g" | while read f; do echo -n ",$f-load,$f-convert"; done)" > "$CSV_HISTORY"
 
 function launch {
 
     if test "$1" = "offload"; then
         export OOO_EXIT_POST_STARTUP=1
-        valgrind --tool=callgrind --callgrind-out-file="$CG_LOG"-offload.log --simulate-cache=yes --dump-instr=yes --collect-bus=yes --branch-sim=yes "$OFFICEBIN" --splash-pipe=0 --headless > /dev/null 2>&1
+        CG_OUT_FILE="${CG_LOG}-offload-${2}.log"
+        valgrind --tool=callgrind --callgrind-out-file="${CG_OUT_FILE}" --simulate-cache=yes --dump-instr=yes --collect-bus=yes --branch-sim=yes "$OFFICEBIN" --splash-pipe=0 --headless > /dev/null 2>&1
         unset OOO_EXIT_POST_STARTUP
-        echo -n "$CG_LOG"-offload.log
     else
-        fn=${1#$DOCUMENTSDIR\/}
-        ext=${fn##*.}
-        valgrind --tool=callgrind --callgrind-out-file="$CG_LOG"-onload-"$fn".log --simulate-cache=yes --dump-instr=yes --collect-bus=yes --branch-sim=yes "$OFFICEBIN" --splash-pipe=0 --headless --convert-to "$ext" --outdir tmp "$1" > /dev/null 2>&1
-        echo -n "$CG_LOG"-onload-"$fn".log
+        if test "$2" = "load"; then
+            export OOO_EXIT_POST_STARTUP=1
+            CG_OUT_FILE="${CG_LOG}-onload-${fn}-${2}.log"
+            valgrind --tool=callgrind --callgrind-out-file="${CG_OUT_FILE}" --simulate-cache=yes --dump-instr=yes --collect-bus=yes --branch-sim=yes "$OFFICEBIN" --splash-pipe=0 --headless "$1" > /dev/null 2>&1
+            unset OOO_EXIT_POST_STARTUP
+        else
+            fn=${1#$DOCUMENTSDIR\/}
+            ext=${fn##*.}
+            CG_OUT_FILE="${CG_LOG}-onload-${fn}-${2}.log"
+            valgrind --tool=callgrind --callgrind-out-file="${CG_OUT_FILE}" --simulate-cache=yes --dump-instr=yes --collect-bus=yes --branch-sim=yes "$OFFICEBIN" --splash-pipe=0 --headless --convert-to "$ext" --outdir tmp "$1" > /dev/null 2>&1
+        fi
     fi
+    echo -n "${CG_OUT_FILE}"
 }
 
 # Mapping the data to array:
@@ -95,7 +103,7 @@ function launch {
 echo -n "$TESTDATE","$LOVERSION" >> "$CSV_HISTORY"
 
 function write_data {
-    cur_log=$(launch "$1")
+    cur_log=$(launch "${1}" "${2}")
 
     data=($(grep '^summary:' "$cur_log" | sed s/"summary: "//))
     
@@ -105,7 +113,7 @@ function write_data {
     if test "$1" = "offload"; then
         CSV_FN="${CSV_LOG_DIR}/offload-${2}.csv"
     else
-        CSV_FN="${CSV_LOG_DIR}/onload-${1#$DOCUMENTSDIR\/}.csv"
+        CSV_FN="${CSV_LOG_DIR}/onload-${1#$DOCUMENTSDIR\/}-${2}.csv"
     fi
 
     echo -n "$TESTDATE"$'\t'"$LOVERSION" >> "$CSV_FN"
@@ -129,7 +137,10 @@ $(write_data "offload" "second")
 # Loaded launch one by one
 echo "Start onload pvt..."
 find $DOCUMENTSDIR -type f |  grep -Ev "\/\." | while read f; do
-    $(write_data "$f")
+    echo "loading ${f}.."
+    $(write_data "$f" "load")
+    echo "converting ${f}.."
+    $(write_data "$f" "convert")
 done
 
 echo "" >> "$CSV_HISTORY"
commit 1ea68a205d904cb8c7a10cbe9dfb18f904dd7fb6
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Mon Mar 17 16:24:03 2014 +0100

    loperf: Remove user directory before first start; and then start again.

diff --git a/loperf/loperf.sh b/loperf/loperf.sh
index c0a31b2..880d5a8 100755
--- a/loperf/loperf.sh
+++ b/loperf/loperf.sh
@@ -62,7 +62,7 @@ test -f "$CSV_HISTORY" || echo -e "time,git-commit,offload$(ls $DOCUMENTSDIR/* |
 
 function launch {
 
-    if test "$1" = ""; then
+    if test "$1" = "offload"; then
         export OOO_EXIT_POST_STARTUP=1
         valgrind --tool=callgrind --callgrind-out-file="$CG_LOG"-offload.log --simulate-cache=yes --dump-instr=yes --collect-bus=yes --branch-sim=yes "$OFFICEBIN" --splash-pipe=0 --headless > /dev/null 2>&1
         unset OOO_EXIT_POST_STARTUP
@@ -102,8 +102,11 @@ function write_data {
     test -n "$GZIP" && gzip "$cur_log" > /dev/null 2>&1
 
     #Collect data to csv file
-    test -z "$1" && CSV_FN="$CSV_LOG_DIR"/"offload.csv"
-    test -n "$1" && CSV_FN="$CSV_LOG_DIR"/"onload-${1#$DOCUMENTSDIR\/}".csv
+    if test "$1" = "offload"; then
+        CSV_FN="${CSV_LOG_DIR}/offload-${2}.csv"
+    else
+        CSV_FN="${CSV_LOG_DIR}/onload-${1#$DOCUMENTSDIR\/}.csv"
+    fi
 
     echo -n "$TESTDATE"$'\t'"$LOVERSION" >> "$CSV_FN"
     for i in $(seq 0 13); do
@@ -117,8 +120,11 @@ function write_data {
 }
 
 # Do a clean launch
-echo "Start offload pvt..."
-$(write_data "")
+rm -rf ${1/program\/soffice.bin/user}
+echo "First start offload pvt..."
+$(write_data "offload" "first")
+echo "Second start offload pvt..."
+$(write_data "offload" "second")
 
 # Loaded launch one by one
 echo "Start onload pvt..."


More information about the Libreoffice-commits mailing list