equal
deleted
inserted
replaced
3 # $Id$ |
3 # $Id$ |
4 # Author: Makarius |
4 # Author: Makarius |
5 # |
5 # |
6 # DESCRIPTION: Produce statistics from isatest session logs. |
6 # DESCRIPTION: Produce statistics from isatest session logs. |
7 |
7 |
8 ISATEST_LOG=~isatest/log |
|
9 |
|
10 ## platform settings |
8 ## platform settings |
11 |
9 |
12 case $(uname) in |
10 case $(uname) in |
13 SunOS) |
11 SunOS) |
14 ZGREP=xgrep |
12 ZGREP=xgrep |
15 TE="png color" |
13 TE="png color" |
16 ;; |
14 ;; |
17 *) |
15 *) |
18 ZGREP=zgrep |
16 ZGREP=zgrep |
19 TE="png" |
17 TE="png" |
20 ;; |
18 ;; |
21 esac |
19 esac |
|
20 |
22 |
21 |
23 ## diagnostics |
22 ## diagnostics |
24 |
23 |
25 PRG="$(basename "$0")" |
24 PRG="$(basename "$0")" |
26 |
25 |
50 DIR="$1"; shift |
49 DIR="$1"; shift |
51 PLATFORM="$1"; shift |
50 PLATFORM="$1"; shift |
52 TIMESPAN="$1"; shift |
51 TIMESPAN="$1"; shift |
53 SESSIONS="$@" |
52 SESSIONS="$@" |
54 |
53 |
|
54 if [ "$PLATFORM" = afp ]; then |
|
55 LOG_DIR=~isatest/afp-log |
|
56 LOG_NAME="afp-test-devel*" |
|
57 else |
|
58 LOG_DIR=~isatest/log |
|
59 LOG_NAME="isatest-makeall-${PLATFORM}*" |
|
60 fi |
|
61 |
55 |
62 |
56 ## main |
63 ## main |
57 |
64 |
58 ALL_DATA="/tmp/isatest-all$$.dat" |
65 ALL_DATA="/tmp/isatest-all$$.dat" |
59 SESSION_DATA="/tmp/isatest$$.dat" |
66 SESSION_DATA="/tmp/isatest$$.dat" |
60 mkdir -p "$DIR" || fail "Bad directory: $DIR" |
67 mkdir -p "$DIR" || fail "Bad directory: $DIR" |
61 |
68 |
62 $ZGREP "^Finished .*elapsed" \ |
69 $ZGREP "^Finished .*elapsed" \ |
63 $(find "$ISATEST_LOG" -name "isatest-makeall-${PLATFORM}*" -ctime "-${TIMESPAN}") | \ |
70 $(find "$LOG_DIR" -name "$LOG_NAME" -ctime "-${TIMESPAN}") | \ |
64 perl -e ' |
71 perl -e ' |
65 while (<>) { |
72 while (<>) { |
66 if (m/isatest-makeall-.*-(\d+)-(\d+)-(\d+)-.*:Finished (\S+) \(.*, (\d+):(\d+):(\d+) cpu time\)/) { |
73 if (m/(\d\d\d\d)-(\d\d)-(\d\d).*:Finished (\S+) \(.*, (\d+):(\d+):(\d+) cpu time\)/) { |
67 my $year = $1; |
74 my $year = $1; |
68 my $month = $2; |
75 my $month = $2; |
69 my $day = $3; |
76 my $day = $3; |
70 my $name = $4; |
77 my $name = $4; |
71 my $time = ($5 * 3600 + $6 * 60 + $7) / 60; |
78 my $time = ($5 * 3600 + $6 * 60 + $7) / 60; |