security/nss/tests/perf/perf.sh

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:15a98b37cd89
1 #! /bin/bash
2 #
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7 ########################################################################
8 #
9 # mozilla/security/nss/tests/perf/perf.sh
10 #
11 # script run from the nightly NSS QA to measure nss performance
12 # needs to work on all Unix and Windows platforms
13 #
14 # special strings
15 # ---------------
16 # FIXME ... known problems, search for this string
17 # NOTE .... unexpected behavior
18 #
19 ########################################################################
20
21 ############################## perf_init ##############################
22 # local shell function to initialize this script
23 ########################################################################
24
25 perf_init()
26 {
27 SCRIPTNAME="perf.sh"
28 if [ -z "${INIT_SOURCED}" ] ; then
29 cd ../common
30 . ./init.sh
31 fi
32 SCRIPTNAME="perf.sh"
33 PERFDIR=${HOSTDIR}/perf
34 mkdir -p ${PERFDIR}
35 }
36
37 perf_init
38 cd ${PERFDIR}
39 RSAPERF_OUT=`${BINDIR}/rsaperf -i 300 -s -n none`
40 RSAPERF_OUT=`echo $RSAPERF_OUT | sed \
41 -e "s/^/RSAPERF: $OBJDIR /" \
42 -e 's/microseconds/us/' \
43 -e 's/milliseconds/ms/' \
44 -e 's/seconds/s/' \
45 -e 's/ minutes, and /_min_/'`
46
47 echo "$RSAPERF_OUT"
48
49
50
51 #FIXME
52 #export RSAPERF_OUT
53 #
54 #perl -e '
55
56 #@rsaperf=split(/ /, $ENV{RSAPERF_OUT});
57
58 #echo "${RSAPERF_OUT}" | read IT_NUM T1 T2 TOT_TIM TOT_TIM_U \
59 #T3 T4 T5 AVRG_TIM AVRG_TIM_U
60
61 #300 iterations in 8.881 seconds one operation every 29606 microseconds

mercurial