include elapsed time for parallel sessions;
authorwenzelm
Wed Nov 21 16:36:47 2007 +0100 (2007-11-21)
changeset 2545380557dafd2a0
parent 25452 089a82c28a42
child 25454 470a61a65712
include elapsed time for parallel sessions;
Admin/isatest/isatest-statistics
     1.1 --- a/Admin/isatest/isatest-statistics	Wed Nov 21 14:43:50 2007 +0100
     1.2 +++ b/Admin/isatest/isatest-statistics	Wed Nov 21 16:36:47 2007 +0100
     1.3 @@ -51,6 +51,15 @@
     1.4  TIMESPAN="$1"; shift
     1.5  SESSIONS="$@"
     1.6  
     1.7 +case "$PLATFORM" in
     1.8 +  *para*)
     1.9 +    PARALLEL=true
    1.10 +    ;;
    1.11 +  *)
    1.12 +    PARALLEL=false
    1.13 +    ;;
    1.14 +esac
    1.15 +
    1.16  if [ "$PLATFORM" = afp ]; then
    1.17    LOG_DIR=~isatest/afp-log
    1.18    LOG_NAME="afp-test-devel*"
    1.19 @@ -70,20 +79,25 @@
    1.20    $(find "$LOG_DIR" -name "$LOG_NAME" -ctime "-${TIMESPAN}") | \
    1.21  perl -e '
    1.22    while (<>) {
    1.23 -    if (m/(\d\d\d\d)-(\d\d)-(\d\d).*:Finished (\S+) \(.*, (\d+):(\d+):(\d+) cpu time\)/) {
    1.24 +    if (m/(\d\d\d\d)-(\d\d)-(\d\d).*:Finished (\S+) \((\d+):(\d+):(\d+) elapsed time, (\d+):(\d+):(\d+) cpu time\)/) {
    1.25          my $year = $1;
    1.26          my $month = $2;
    1.27          my $day = $3;
    1.28          my $name = $4;
    1.29 -        my $time = ($5 * 3600 + $6 * 60 + $7) / 60;
    1.30 +        my $elapsed_time = ($5 * 3600 + $6 * 60 + $7) / 60;
    1.31 +        my $cpu_time = ($8 * 3600 + $9 * 60 + $10) / 60;
    1.32  
    1.33 -        printf "$name $year-$month-$day %.2f\n", $time;
    1.34 +        printf "$name $year-$month-$day %.2f %.2f\n", $cpu_time, $elapsed_time;
    1.35      }
    1.36    }' > "$ALL_DATA"
    1.37  
    1.38  for SESSION in $SESSIONS
    1.39  do
    1.40    fgrep "$SESSION " "$ALL_DATA" > "$SESSION_DATA"
    1.41 +  PLOT="plot [] [0:] \"$SESSION_DATA\" using 2:3 smooth sbezier notitle, \"$SESSION_DATA\" using 2:3 smooth csplines notitle"
    1.42 +  if [ "$PARALLEL" = true ]; then
    1.43 +    PLOT="${PLOT}, \"$SESSION_DATA\" using 2:4 smooth sbezier title \"elapsed\", \"$SESSION_DATA\" using 2:4 smooth csplines title \"elapsed\""
    1.44 +  fi
    1.45    gnuplot <<EOF
    1.46  set terminal $TE
    1.47  set output "$DIR/${SESSION}.png"
    1.48 @@ -91,7 +105,7 @@
    1.49  set timefmt "%Y-%m-%d"
    1.50  set format x "%d-%b"
    1.51  set xlabel "$SESSION"
    1.52 -plot [] [0:] "$SESSION_DATA" using 2:3 smooth sbezier notitle, "$SESSION_DATA" using 2:3 smooth csplines notitle
    1.53 +$PLOT
    1.54  EOF
    1.55  done
    1.56