You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2019/07/25 16:35:44 UTC

[geode-benchmarks] branch develop updated: Added --baselineDir and branchDir options to analyze_tests script (#93)

This is an automated email from the ASF dual-hosted git repository.

jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git


The following commit(s) were added to refs/heads/develop by this push:
     new 8d88caa  Added --baselineDir and branchDir options to analyze_tests script (#93)
8d88caa is described below

commit 8d88caa814a5145eb39326cca252ed50405c008b
Author: Kamilla Aslami <ka...@pivotal.io>
AuthorDate: Thu Jul 25 09:35:39 2019 -0700

    Added --baselineDir and branchDir options to analyze_tests script (#93)
---
 infrastructure/scripts/aws/analyze_tests.sh | 42 ++++++++++++++++++++++++++---
 1 file changed, 39 insertions(+), 3 deletions(-)

diff --git a/infrastructure/scripts/aws/analyze_tests.sh b/infrastructure/scripts/aws/analyze_tests.sh
index de7c1af..87f6f69 100755
--- a/infrastructure/scripts/aws/analyze_tests.sh
+++ b/infrastructure/scripts/aws/analyze_tests.sh
@@ -19,6 +19,8 @@ set -e
 
 TOP_DIR=$(git rev-parse --show-toplevel)
 
+BASELINE_DIR=
+BRANCH_DIR=
 OUTPUT_DIR=
 CI=0
 
@@ -32,13 +34,27 @@ while (( "$#" )); do
         shift
       fi
       ;;
+    --baseline|--baselineDir )
+      if [ "$2" ]; then
+        BASELINE_DIR=$2
+        shift
+      fi
+      ;;
+    --branch|--branchDir )
+      if [ "$2" ]; then
+        BRANCH_DIR=$2
+        shift
+      fi
+      ;;
     --ci )
       CI=1
       ;;
     -h|--help|-\? )
-      echo "Usage: $(basename "$0") -o <output directory> [options ...] [-- arguments ...]"
+      echo "Usage: $(basename "$0") [-o <output directory> | [--baselineDir <baseline directory> --branchDir <branch directory>]] [options ...] [-- arguments ...]"
       echo "Options:"
       echo "-o|--output|--outputDir : The directory containing benchmark results"
+      echo "--baseline|--baselineDir : The directory containing baseline benchmark results"
+      echo "--branch|--branchDir : The directory containing branch benchmark results"
       echo "--ci : Set if starting instances for Continuous Integration"
       echo "-- : All subsequent arguments are passed to the benchmark task as arguments."
       echo "-h|--help : This help message"
@@ -56,8 +72,28 @@ while (( "$#" )); do
   shift
 done
 
-BASELINE_DIR="${OUTPUT_DIR}/baseline"
-BRANCH_DIR="${OUTPUT_DIR}/branch"
+if [[ ! -z "${OUTPUT_DIR}" ]]; then
+  if [[ ! -z "${BRANCH_DIR}" ]] || [[ ! -z "${BASELINE_DIR}" ]]; then
+    echo "Please specify either --outputDir or a combination of --baselineDir and --branchDir"
+    exit 1
+  fi
+  BASELINE_DIR="${OUTPUT_DIR}/baseline"
+  BRANCH_DIR="${OUTPUT_DIR}/branch"
+fi
+
+if [[ -z "${BRANCH_DIR}" ]] || [[ -z "${BASELINE_DIR}" ]]; then
+  echo "Both --baselineDir and --branchDir should be specified"
+  exit 1
+fi
+
+if [[ ${BASELINE_DIR} != /* ]]; then
+    BASELINE_DIR="${PWD}/${BASELINE_DIR}"
+fi
+
+if [[ ${BRANCH_DIR} != /* ]]; then
+    BRANCH_DIR="${PWD}/${BRANCH_DIR}"
+fi
+
 BASELINE_BENCHMARKS="$(ls -td ${BASELINE_DIR}/benchmarks_* | tail -1)"
 BRANCH_BENCHMARKS="$(ls -td ${BRANCH_DIR}/benchmarks_* | tail -1)"
 pushd ${TOP_DIR}