#!/bin/bash title="HTTPS via HTTP/2.0" wget_options="-q --no-config -O/dev/null" wget_version=$(wget --version|head -1|cut -d' ' -f3) wget2_options="-q --no-config -O/dev/null" wget2_version=$(../src/wget2_noinstall --version 2>/dev/null|head -1|cut -d' ' -f3) curl_options="-s --cert-status --http2 -o/dev/null" curl_version=$(curl --version|head -1|cut -d' ' -f2) NCHECKS=3 MINX=1 MAXX=3 SLEEP=0.5 rm -f wget.data wget2.data curl.data for ((nreq=$MINX;nreq<=$MAXX;nreq++)); do urls="" for ((i=1;i<=nreq;i++)); do urls="$urls https://www.google.com/a${i}.html" done # warmup run (e.g. caching OCSP responses) if [ $nreq -eq 1 ]; then wget ${wget_options} $urls ../src/wget2_noinstall ${wget2_options} $urls curl ${curl_options} $urls >/dev/null 2>&1 fi # timings for wget for ((i=0;i<$NCHECKS;i++)); do t1=$(date +%s%3N) wget ${wget_options} $urls t2=$(date +%s%3N) echo $nreq $((t2-t1)) sleep $SLEEP done >>wget.data # timings for wget2 for ((i=0;i<$NCHECKS;i++)); do t1=$(date +%s%3N) ../src/wget2_noinstall ${wget2_options} $urls t2=$(date +%s%3N) echo $nreq $((t2-t1)) sleep $SLEEP done >>wget2.data # timings for curl for ((i=0;i<$NCHECKS;i++)); do t1=$(date +%s%3N) curl ${curl_options} $urls >/dev/null 2>&1 t2=$(date +%s%3N) echo $nreq $((t2-t1)) sleep $SLEEP done >>curl.data done cat <