Skip to content

Commit

Permalink
[hotfix] [build] Print cache info
Browse files Browse the repository at this point in the history
Print the size of the Maven cache copied for each TravisCI job.

This closes apache#5279.
  • Loading branch information
greghogan authored and zentol committed Jan 24, 2018
1 parent 2e5b9dd commit 7e5a978
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions tools/travis_mvn_watchdog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,28 @@ ARTIFACTS_FILE=${TRAVIS_JOB_NUMBER}.tar.gz
# FUNCTIONS
# =============================================================================

print_system_info() {
FOLD_ESCAPE="\x0d\x1b"
COLOR_ON="\x5b\x30\x4b\x1b\x5b\x33\x33\x3b\x31\x6d"
COLOR_OFF="\x1b\x5b\x30\x6d"

echo -e "travis_fold:start:cpu_info${FOLD_ESCAPE}${COLOR_ON}CPU information${COLOR_OFF}"
lscpu
echo -en "travis_fold:end:cpu_info${FOLD_ESCAPE}"

echo -e "travis_fold:start:mem_info${FOLD_ESCAPE}${COLOR_ON}Memory information${COLOR_OFF}"
cat /proc/meminfo
echo -en "travis_fold:end:mem_info${FOLD_ESCAPE}"

echo -e "travis_fold:start:disk_info${FOLD_ESCAPE}${COLOR_ON}Disk information${COLOR_OFF}"
df -hH
echo -en "travis_fold:end:disk_info${FOLD_ESCAPE}"

echo -e "travis_fold:start:cache_info${FOLD_ESCAPE}${COLOR_ON}Cache information${COLOR_OFF}"
du -s --si $HOME/.m2
echo -en "travis_fold:end:cache_info${FOLD_ESCAPE}"
}

upload_artifacts_s3() {
echo "PRODUCED build artifacts."

Expand Down Expand Up @@ -433,24 +455,7 @@ WD_PID=$!

echo "STARTED watchdog (${WD_PID})."


# Print and fold CPU, memory, and filesystem info
FOLD_ESCAPE="\x0d\x1b"
COLOR_ON="\x5b\x30\x4b\x1b\x5b\x33\x33\x3b\x31\x6d"
COLOR_OFF="\x1b\x5b\x30\x6d"

echo -e "travis_fold:start:cpu_info${FOLD_ESCAPE}${COLOR_ON}CPU information${COLOR_OFF}"
lscpu
echo -en "travis_fold:end:cpu_info${FOLD_ESCAPE}"

echo -e "travis_fold:start:mem_info${FOLD_ESCAPE}${COLOR_ON}Memory information${COLOR_OFF}"
cat /proc/meminfo
echo -en "travis_fold:end:mem_info${FOLD_ESCAPE}"

echo -e "travis_fold:start:disk_info${FOLD_ESCAPE}${COLOR_ON}Disk information${COLOR_OFF}"
df -hH
echo -en "travis_fold:end:disk_info${FOLD_ESCAPE}"

print_system_info

# Make sure to be in project root
cd $HERE/../
Expand Down

0 comments on commit 7e5a978

Please sign in to comment.