wall_clock_time_split_group_V2.sh 702 B

123456789101112131415161718192021222324252627282930
  1. # timing for splitting and grouping
  2. D="$2"/sysout
  3. PREFIX=sg_testing
  4. case "$1" in
  5. "normal") PREFIX=split_grp
  6. ;;
  7. "test") PREFIX=sg_testing
  8. ;;
  9. "tumor") PREFIX=split_grp
  10. ;;
  11. esac
  12. DIR=wall_clock_time_details_"$1"
  13. SUFFIX=`date '+%Y%m%d%H%M%S'`
  14. mv $DIR "$DIR"_"$SUFFIX" 2>/dev/null
  15. mkdir -p $DIR
  16. FN_PR=$DIR/time
  17. find $D -name "$PREFIX"* | xargs grep "real" > "$FN_PR".txt
  18. awk -F ' ' '{print $2}' "$FN_PR".txt > "$FN_PR"_nums.txt
  19. sed 's/m/ /g; s/s//g' "$FN_PR"_nums.txt > "$FN_PR"_nums2.txt # remove all "m" "s"
  20. sort -k1 -k2 -n -r "$FN_PR"_nums2.txt > "$FN_PR"_nums2_sorted.txt
  21. awk '{ printf ("%.18f\n", $1 * 60 + $2) }' "$FN_PR"_nums2_sorted.txt > wall_clock_final_"$SUFFIX".txt