Last active
September 4, 2019 08:41
-
-
Save asi1024/952e2b84bdd727fb121e79e1e3e228b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# set -eu | |
# export CUDA_VISIBLE_DEVICES=-1 | |
DIR=$1 | |
HASH=`git rev-parse --short HEAD` | |
echo "DIR=${DIR}" | |
echo "HASH=${HASH}" | |
for T in `find ${DIR} | grep -E /test_.*py$` | |
do | |
echo $T | awk '{printf "%-110s",$1}' | |
SEC=`(/usr/bin/time -f "%U" python -m pytest -m "not slow and not gpu and not cudnn and not ideep" -k "not cuda and not gpu" ${T} > /dev/null) 2>&1` | |
echo $SEC | awk '{printf "%5.2f",$1}' | |
echo "" | |
done | |
# ./time.sh . | tee out.txt | |
# cat out.txt | awk '{sum+=$2} END {print sum}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment