security/nss/tests/perf/perf.sh

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rwxr-xr-x

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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/.
     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 ########################################################################
    21 ############################## perf_init ##############################
    22 # local shell function to initialize this script
    23 ########################################################################
    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 }
    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_/'`
    47 echo "$RSAPERF_OUT"
    51 #FIXME
    52 #export RSAPERF_OUT
    53 #
    54 #perl -e '
    56 #@rsaperf=split(/ /, $ENV{RSAPERF_OUT});
    58 #echo "${RSAPERF_OUT}" | read IT_NUM T1 T2 TOT_TIM TOT_TIM_U \
    59     #T3 T4 T5 AVRG_TIM AVRG_TIM_U
    61 #300 iterations in 8.881 seconds one operation every 29606 microseconds

mercurial