summaryrefslogtreecommitdiffstats
path: root/courgette
diff options
context:
space:
mode:
authordgarrett@chromium.org <dgarrett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-28 23:12:58 +0000
committerdgarrett@chromium.org <dgarrett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-28 23:12:58 +0000
commitd485146d1ad7b3b695958ba59d3db16da752c418 (patch)
treebc41776953a2ac8d9c64d8b0844564563ab08890 /courgette
parentfd0a76f109c0fa3f9dd973ee6921957501f317e5 (diff)
downloadchromium_src-d485146d1ad7b3b695958ba59d3db16da752c418.zip
chromium_src-d485146d1ad7b3b695958ba59d3db16da752c418.tar.gz
chromium_src-d485146d1ad7b3b695958ba59d3db16da752c418.tar.bz2
Factored common functionality out of the Courgette stress test scripts
BUG=274054 R=dgarrett@chromium.org Review URL: https://codereview.chromium.org/22935012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220115 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'courgette')
-rwxr-xr-xcourgette/analyze_mem_test4
-rwxr-xr-xcourgette/analyze_stress_test16
-rwxr-xr-xcourgette/run_mem_test4
-rwxr-xr-xcourgette/run_stress_test12
4 files changed, 5 insertions, 31 deletions
diff --git a/courgette/analyze_mem_test b/courgette/analyze_mem_test
index 9470fa2..1e72939 100755
--- a/courgette/analyze_mem_test
+++ b/courgette/analyze_mem_test
@@ -6,9 +6,7 @@
# Produce memory metrics for run_apply_test
-error() {
- echo "error: ${@}" >&2
-}
+source "$(dirname ${0})/stress_test_common"
compute_percentiles() {
if [ -z "${1}" ]; then
diff --git a/courgette/analyze_stress_test b/courgette/analyze_stress_test
index 338eb6e..0c700eb 100755
--- a/courgette/analyze_stress_test
+++ b/courgette/analyze_stress_test
@@ -6,21 +6,9 @@
# Produce metrics analyzing the output of a stress test
-set -e
-
-error() {
- echo "error: ${@}" >&2
-}
+source "$(dirname ${0})/stress_test_common"
-# 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
-}
+set -e
# Given a token, search for and compute the percentiles from logfile.
compute_percentiles() {
diff --git a/courgette/run_mem_test b/courgette/run_mem_test
index 07a8e5b..7f3640a 100755
--- a/courgette/run_mem_test
+++ b/courgette/run_mem_test
@@ -6,9 +6,7 @@
# Collect memory usage on the patches from run_stress_test
-error() {
- echo "error: ${@}" >&2
-}
+source "$(dirname ${0})/stress_test_common"
main() {
if [ $# -lt 1 ]; then
diff --git a/courgette/run_stress_test b/courgette/run_stress_test
index 442ad3d..dd1a78d 100755
--- a/courgette/run_stress_test
+++ b/courgette/run_stress_test
@@ -6,9 +6,7 @@
# Stress test and size measurement for courgette patches.
-error() {
- echo "error: ${@}" >&2
-}
+source "$(dirname ${0})/stress_test_common"
outdir_prefix="stress_test_"
time="/usr/bin/time"
@@ -163,14 +161,6 @@ done 2>&1 | tee -a "${log}"
date >> "${log}"
-count_result() {
- if [ ! -z "${1}" ]; then
- echo $(cat "${log}" | grep "^${1} " | wc -l)
- else
- echo 0
- fi
-}
-
cat <<EOF | tee -a "${log}"
$(count_result "PASS_COURGETTE") successful courgette patches
$(count_result "FAIL_COURGETTE") failed courgette patches (search log for \