2018-11-10 20:09:07 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
CUR_DIR=`dirname $0`
|
|
|
|
CUR_DIR=`readlink -f $CUR_DIR`
|
|
|
|
CUR_DIR="${CUR_DIR}/"
|
|
|
|
|
|
|
|
RESULT_FILE=${RESULT_FILE:=${CUR_DIR}check-include.log}
|
|
|
|
finish() {
|
|
|
|
echo include check failed:
|
|
|
|
cat $RESULT_FILE
|
|
|
|
}
|
|
|
|
trap finish 0 1 3 6 15
|
|
|
|
|
|
|
|
sh ${CUR_DIR}check-include > $RESULT_FILE 2>&1
|
|
|
|
|
|
|
|
echo Results:
|
|
|
|
echo Top by memory:
|
2018-12-23 14:19:11 +00:00
|
|
|
cat $RESULT_FILE | sort -nrk4 | head -n20
|
2018-11-10 20:09:07 +00:00
|
|
|
|
|
|
|
echo Top by time:
|
2018-12-23 14:19:11 +00:00
|
|
|
cat $RESULT_FILE | sort -nrk3 | head -n20
|
2018-11-10 20:09:07 +00:00
|
|
|
|
|
|
|
echo Top by includes:
|
2018-12-23 14:19:11 +00:00
|
|
|
cat $RESULT_FILE | sort -nrk2 | head -n20
|
|
|
|
|
|
|
|
trap "" EXIT
|