cloudflare/ClickHouse
Publicmirrored fromhttps://github.com/cloudflare/ClickHouse
utils/check-style/check-include-stat
27lines · modecode
7 years ago
| 1 | #!/bin/sh |
| 2 | set -e |
| 3 | |
| 4 | CUR_DIR=`dirname $0` |
| 5 | CUR_DIR=`readlink -f $CUR_DIR` |
| 6 | CUR_DIR="${CUR_DIR}/" |
| 7 | |
| 8 | RESULT_FILE=${RESULT_FILE:=${CUR_DIR}check-include.log} |
| 9 | finish() { |
| 10 | echo include check failed: |
| 11 | cat $RESULT_FILE |
| 12 | } |
| 13 | trap finish 0 1 3 6 15 |
| 14 | |
| 15 | sh ${CUR_DIR}check-include > $RESULT_FILE 2>&1 |
| 16 | |
| 17 | echo Results: |
| 18 | echo Top by memory: |
| 19 | cat $RESULT_FILE | sort -nrk4 | head -n20 |
| 20 | |
| 21 | echo Top by time: |
| 22 | cat $RESULT_FILE | sort -nrk3 | head -n20 |
| 23 | |
| 24 | echo Top by includes: |
| 25 | cat $RESULT_FILE | sort -nrk2 | head -n20 |
| 26 | |
| 27 | trap "" EXIT |