aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bench1.sh13
-rwxr-xr-xtests/bench2.sh13
-rwxr-xr-xtests/generate.py10
3 files changed, 36 insertions, 0 deletions
diff --git a/tests/bench1.sh b/tests/bench1.sh
new file mode 100644
index 00000000..4458e9a7
--- /dev/null
+++ b/tests/bench1.sh
@@ -0,0 +1,13 @@
+export CIPHER=aes128-cbc
+export DEST=localhost
+
+echo "Upload raw SSH statistics"
+echo "local machine: `uname -a`"
+echo "Cipher : $CIPHER ; Destination : $DEST (`ssh $DEST uname -a`)"
+echo "Local ssh version: `ssh -V 2>&1`"
+echo "Ping latency to $DEST":
+ping -q -c 1 -n $DEST
+echo "Destination $DEST SSHD vesion : `echo | nc $DEST 22 | head -n1`"
+echo "ssh login latency :`(time -f user:%U ssh $DEST 'id > /dev/null') 2>&1`"
+./generate.py | dd bs=4096 count=100000 | time ssh -c $CIPHER $DEST "dd bs=4096 of=/dev/null" 2>&1
+
diff --git a/tests/bench2.sh b/tests/bench2.sh
new file mode 100755
index 00000000..01d67777
--- /dev/null
+++ b/tests/bench2.sh
@@ -0,0 +1,13 @@
+export CIPHER=aes128-cbc
+export DEST=localhost
+
+echo "Upload raw SSH statistics"
+echo "local machine: `uname -a`"
+echo "Cipher : $CIPHER ; Destination : $DEST (`ssh $DEST uname -a`)"
+echo "Local ssh version: `samplessh -V 2>&1`"
+echo "Ping latency to $DEST":
+ping -q -c 1 -n $DEST
+echo "Destination $DEST SSHD vesion : `echo | nc $DEST 22 | head -n1`"
+echo "ssh login latency :`(time -f user:%U samplessh $DEST 'id > /dev/null') 2>&1`"
+./generate.py | dd bs=4096 count=100000 | strace samplessh -c $CIPHER $DEST "dd bs=4096 of=/dev/null" 2>&1
+
diff --git a/tests/generate.py b/tests/generate.py
new file mode 100755
index 00000000..08c2d5b1
--- /dev/null
+++ b/tests/generate.py
@@ -0,0 +1,10 @@
+#!/usr/bin/python
+import os
+a=""
+for i in xrange(4096):
+ a+=chr(i % 256);
+while True:
+ try:
+ os.write(1,a)
+ except:
+ exit(0)