URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
[/] [openrisc/] [trunk/] [gnu-src/] [check-times.sh] - Blame information for rev 562
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
548 |
jeremybenn |
#!/bin/bash
|
2 |
|
|
|
3 |
|
|
# Copyright (C) 2010 Embecosm Limited
|
4 |
|
|
|
5 |
|
|
# Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
|
6 |
|
|
|
7 |
|
|
# This file is a script to look at log file timings
|
8 |
|
|
|
9 |
|
|
# This program is free software; you can redistribute it and/or modify it
|
10 |
|
|
# under the terms of the GNU General Public License as published by the Free
|
11 |
|
|
# Software Foundation; either version 3 of the License, or (at your option)
|
12 |
|
|
# any later version.
|
13 |
|
|
|
14 |
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT
|
15 |
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
16 |
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
17 |
|
|
# more details.
|
18 |
|
|
|
19 |
|
|
# You should have received a copy of the GNU General Public License along
|
20 |
|
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
21 |
|
|
|
22 |
|
|
# ------------------------------------------------------------------------------
|
23 |
|
|
|
24 |
|
|
# Look for the different GNU results in different directories. We put the
|
25 |
|
|
# results to a temporary file, to allow us to suck out the summary as well.
|
26 |
|
|
|
27 |
|
|
# The argument is the list of log files to process.
|
28 |
|
|
|
29 |
|
|
# Intermediate result
|
30 |
|
|
tmpf=/tmp/check-timings-$$
|
31 |
|
|
tottime=0
|
32 |
|
|
count=0
|
33 |
|
|
|
34 |
|
|
# Get each result
|
35 |
|
|
for logfile in $*
|
36 |
|
|
do
|
37 |
|
|
logfile_base=`basename ${logfile}`
|
38 |
|
|
logtime=`grep "completed in" ${logfile} | sed -e 's/^.*completed in //' | sed -e 's/ seconds.*$//'`
|
39 |
|
|
printf "%-25s %5d\n" ${logfile_base} ${logtime} >> ${tmpf}
|
40 |
|
|
|
41 |
|
|
if [ "x${logtime}" != "x" ]
|
42 |
|
|
then
|
43 |
|
|
tottime=$(( ${tottime} + ${logtime} ))
|
44 |
|
|
count=$(( ${count} + 1 ))
|
45 |
|
|
fi
|
46 |
|
|
done
|
47 |
|
|
|
48 |
|
|
average=$(( ${tottime} / ${count} ))
|
49 |
|
|
sort -n +1 -2 ${tmpf}
|
50 |
|
|
printf "%-25s %5d\n" "Total" ${tottime}
|
51 |
|
|
printf "%-25s %5d\n" "Average" ${average}
|
52 |
|
|
|
53 |
|
|
rm ${tmpf}
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.