You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aw...@apache.org on 2015/07/20 18:42:25 UTC

[17/17] hadoop git commit: HADOOP-12157. test-patch should report max memory consumed (Kengo Seki via aw)

HADOOP-12157. test-patch should report max memory consumed (Kengo Seki via aw)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d84da00b
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d84da00b
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d84da00b

Branch: refs/heads/HADOOP-12111
Commit: d84da00b18f9f5d7dabe18997352f098b8c93799
Parents: fbe6a69
Author: Allen Wittenauer <aw...@apache.org>
Authored: Mon Jul 20 09:42:01 2015 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Mon Jul 20 09:42:01 2015 -0700

----------------------------------------------------------------------
 dev-support/test-patch.sh | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d84da00b/dev-support/test-patch.sh
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh
index 24dafc3..25e8649 100755
--- a/dev-support/test-patch.sh
+++ b/dev-support/test-patch.sh
@@ -386,6 +386,23 @@ function finish_docker_stats
   fi
 }
 
+## @description  Put the max memory consumed by maven at the bottom of the table.
+## @audience     private
+## @stability    stable
+## @replaceable  no
+function finish_footer_table
+{
+  local maxmem
+
+  # shellcheck disable=SC2016,SC2086
+  maxmem=$(find "${PATCH_DIR}" -type f -exec ${AWK} 'match($0, /^\[INFO\] Final Memory: [0-9]+/)
+    { print substr($0, 22, RLENGTH-21) }' {} \; | sort -nr | head -n 1)
+
+  if [[ -n ${maxmem} ]]; then
+    add_footer_table "Max memory used" "${maxmem}MB"
+  fi
+}
+
 ## @description  Put the final elapsed time at the bottom of the table.
 ## @audience     private
 ## @stability    stable
@@ -3473,6 +3490,8 @@ runtests
 
 finish_vote_table
 
+finish_footer_table
+
 output_to_console ${RESULT}
 output_to_bugsystem ${RESULT}
 cleanup_and_exit ${RESULT}