summaryrefslogtreecommitdiffstats
path: root/courgette
diff options
context:
space:
mode:
authorhalyavin <halyavin@chromium.org>2015-03-12 01:34:07 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-12 08:34:57 +0000
commit7b636e95c3096f34fc1d15bbb8227983e412b9ec (patch)
treecf5f6c248d3a3987fc877dc1bcb2ab361bab6670 /courgette
parent26c3a8e0bab4048a14c53f57c988ffacd7f3479f (diff)
downloadchromium_src-7b636e95c3096f34fc1d15bbb8227983e412b9ec.zip
chromium_src-7b636e95c3096f34fc1d15bbb8227983e412b9ec.tar.gz
chromium_src-7b636e95c3096f34fc1d15bbb8227983e412b9ec.tar.bz2
Restore stress_test_common script.
This script were present in https://codereview.chromium.org/22935012 but it disappeared when that CL was commited manually. Also fix copy-paste error in analyze_stress_test. TEST= courgette/run_stress_test -s <chrome_dir1> <chrome_dir2> <result_dir> courgette/run_mem_test <result_dir> courgette/analyze_stress_test <result_dir>/log courgette/analyze_mem_test <result_dir> Also create fake bsdiff and bspatch which use courgette executable and add courgette and these utilities to the PATH. BUG= 274054 R=dgarrett@chromium.org Review URL: https://codereview.chromium.org/994883002 Cr-Commit-Position: refs/heads/master@{#320250}
Diffstat (limited to 'courgette')
-rwxr-xr-xcourgette/analyze_stress_test2
-rwxr-xr-xcourgette/stress_test_common16
2 files changed, 17 insertions, 1 deletions
diff --git a/courgette/analyze_stress_test b/courgette/analyze_stress_test
index 0c700eb..6d2ffd9 100755
--- a/courgette/analyze_stress_test
+++ b/courgette/analyze_stress_test
@@ -53,7 +53,7 @@ $(count_result "FAIL_DISASSEMBLE") failed to disassemble/assemble
$(count_result "PASS_BSDIFF") succesful bsdiff patches
$(count_result "FAIL_BSDIFF") failed bsdiff patches
$(count_result "BEST_COURGETTE") patch(es) where courgette is smaller (bz2)
-$(count_result "BEST_BSDIFF") patch(es) where bsdiff is smaller (xz)
+$(count_result "BEST_BSDIFF") patch(es) where bsdiff is smaller (bz2)
$(count_result "BEST_TIE") patch(es) where both are the same size (bz2)
$(count_result "XZBEST_COURGETTE") patch(es) where courgette (xz) is smaller
$(count_result "XZBEST_BSDIFF") patch(es) where bsdiff is smaller (xz)
diff --git a/courgette/stress_test_common b/courgette/stress_test_common
new file mode 100755
index 0000000..b6c9b25
--- /dev/null
+++ b/courgette/stress_test_common
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# Emit an error message
+error() {
+ echo "error: ${@}" >&2
+}
+
+# Given a token, search for and count the instances of lines from the
+# logfile that start with the token.
+count_result() {
+ if [ ! -z "${1}" ]; then
+ echo $(cat "${log}" | grep "^${1} " | wc -l)
+ else
+ echo 0
+ fi
+} \ No newline at end of file