Skip to content

Commit

Permalink
update https_bench.sh & centminmodbench.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
centminmod committed Jun 11, 2019
1 parent b2c1197 commit 49439f3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 11 additions & 3 deletions centminmodbench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SCRIPTNAME=centminmodbench.sh
SCRIPTAUTHOR='George Liu (eva2000)'
SCRIPTSITE='http://centminmod.com'
SCRIPTGITHUB='http://bench.centminmod.com'
VER=0.9.7
VER=0.9.8
###############################################################
EMAIL='youremail@yourdomain.com'
DEBUG='n'
Expand Down Expand Up @@ -936,7 +936,12 @@ phpi() {
}

changedir() {
cd ${DIR_TMP}/php-${PHPVER}
if [[ ! -d "${DIR_TMP}/php-${PHPVER}" ]]; then
pushd "${DIR_TMP}"
tar xzf php-${PHPVER}.tar.gz
popd
fi
cd "${DIR_TMP}/php-${PHPVER}"
}

fbench() {
Expand Down Expand Up @@ -982,7 +987,10 @@ fmicrobench() {
cecho "-------------------------------------------" $boldgreen

changedir
touch $PHPMICROBENCHLOG
if [[" -d ch $PHPMICROBENCHLOG" ]]; then
tar xzf php-5.6.40.tar.gz
fi
tou"ch $PHPMICROBENCHLOG"
echo -e "\n$(date)" >> $PHPMICROBENCHLOG
for ((i = 0 ; i < $RUNS ; i++)); do
{
Expand Down
4 changes: 3 additions & 1 deletion https_bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# variables
#############
DT=$(date +"%d%m%y-%H%M%S")
VER='1.2'
VER='1.3'
SLEEP_TIME='10'
HTTPS_BENCHCLEANUP='y'
TESTRUNS='5'
Expand Down Expand Up @@ -241,6 +241,8 @@ parsed() {
# encoding
echo
cat "${CENTMINLOGDIR}/h2load-nginx-https-${DT}.log" | grep -v 'Process Request Failure:' | grep -A14 'h2load -t' | sed -e 's|TLS Protocol:|Protocol:|g' -e 's|Server Temp Key|Server-Temp-Key|g' -e 's|Application protocol|Application-protocol|g' | grep -o '\Accept-Encoding: .\{4\}' | sed -e 's|Accept-Encoding: ||g' > /tmp/encoding.txt
# remove unwanted characters
sed -i "s|'||g" /tmp/encoding.txt
# started
echo
cat "${CENTMINLOGDIR}/h2load-nginx-https-${DT}.log" | grep -v 'Process Request Failure:' | grep -A14 'h2load -t' | sed -e 's|TLS Protocol:|Protocol:|g' -e 's|Server Temp Key|Server-Temp-Key|g' -e 's|Application protocol|Application-protocol|g' | awk -F ', ' '/requests: / {print $2}' | sed -e 's| started||g' > /tmp/started.txt
Expand Down

0 comments on commit 49439f3

Please sign in to comment.