diff options
author | halyavin <halyavin@chromium.org> | 2015-03-12 01:34:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-12 08:34:57 +0000 |
commit | 7b636e95c3096f34fc1d15bbb8227983e412b9ec (patch) | |
tree | cf5f6c248d3a3987fc877dc1bcb2ab361bab6670 /courgette | |
parent | 26c3a8e0bab4048a14c53f57c988ffacd7f3479f (diff) | |
download | chromium_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-x | courgette/analyze_stress_test | 2 | ||||
-rwxr-xr-x | courgette/stress_test_common | 16 |
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 |