From af3feba1665973ad9c23f6f4d12676611d633f08 Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Fri, 26 Jul 2013 08:27:36 +0100 Subject: [PATCH] add a very simple test bench for basic ballpark measurements --- test-scripts/runtest-client-bench | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 test-scripts/runtest-client-bench diff --git a/test-scripts/runtest-client-bench b/test-scripts/runtest-client-bench new file mode 100755 index 0000000..d68f82f --- /dev/null +++ b/test-scripts/runtest-client-bench @@ -0,0 +1,25 @@ +#!/bin/sh + +PORT=20004 + +if [ ! -d test-dir ]; then + mkdir test-dir +fi + +if [ ! -f test-dir/small ]; then + dd if=/dev/zero of=test-dir/small bs=1024 count=1024 +fi +if [ ! -f test-dir/big ]; then + dd if=/dev/zero of=test-dir/big bs=1024 count=104448 +fi +cp server.key server.crt test-dir + +(cd test-dir; openssl s_server -WWW -accept $PORT -key server.key -cert server.crt &) + +echo "=========================== WGET =======================" +time wget -q --no-check-certificate -O /dev/null https://localhost:$PORT/small +time wget -q --no-check-certificate -O /dev/null https://localhost:$PORT/big + +echo "=========================== TLS =======================" +time ./debug/dist/build/tls-simpleclient/tls-simpleclient -O /dev/null localhost $PORT --uri /small --no-validation +time ./debug/dist/build/tls-simpleclient/tls-simpleclient -O /dev/null localhost $PORT --uri /big --no-validation