aboutsummaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-12-19 17:29:17 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2010-12-19 18:56:16 +0100
commit1922341e2aa1c8a9f578c33315c3a3842a437fd2 (patch)
tree92d162fe70dc158a8b6ec82ffb9e2cf2ad2fdb28 /benchmarks
parentbcfab67daf09dda4aa71ea715ab999affdf67987 (diff)
downloadlibssh-1922341e2aa1c8a9f578c33315c3a3842a437fd2.tar.gz
libssh-1922341e2aa1c8a9f578c33315c3a3842a437fd2.tar.xz
libssh-1922341e2aa1c8a9f578c33315c3a3842a437fd2.zip
New benchmarks directory
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/CMakeLists.txt21
-rw-r--r--benchmarks/bench1.sh13
-rwxr-xr-xbenchmarks/bench2.sh13
-rw-r--r--benchmarks/bench_scp.c31
4 files changed, 78 insertions, 0 deletions
diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt
new file mode 100644
index 00000000..eb843935
--- /dev/null
+++ b/benchmarks/CMakeLists.txt
@@ -0,0 +1,21 @@
+project(libssh-benchmarks C)
+
+set(benchmarks_SRCS
+
+)
+
+include_directories(
+ ${LIBSSH_PUBLIC_INCLUDE_DIRS}
+)
+
+add_executable(bench_scp bench_scp.c ${benchmarks_SRCS})
+
+target_link_libraries(bench_scp ${LIBSSH_SHARED_LIBRARY})
+
+include_directories(
+ ${LIBSSH_PUBLIC_INCLUDE_DIRS}
+ ${CMAKE_BINARY_DIR}
+)
+
+if (WITH_SFTP)
+endif (WITH_SFTP)
diff --git a/benchmarks/bench1.sh b/benchmarks/bench1.sh
new file mode 100644
index 00000000..4458e9a7
--- /dev/null
+++ b/benchmarks/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/benchmarks/bench2.sh b/benchmarks/bench2.sh
new file mode 100755
index 00000000..01d67777
--- /dev/null
+++ b/benchmarks/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/benchmarks/bench_scp.c b/benchmarks/bench_scp.c
new file mode 100644
index 00000000..7406287d
--- /dev/null
+++ b/benchmarks/bench_scp.c
@@ -0,0 +1,31 @@
+/* bench_scp.c
+ *
+ * This file is part of the SSH Library
+ *
+ * Copyright (c) 2010 by Aris Adamantiadis
+ *
+ * The SSH Library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
+ * option) any later version.
+ *
+ * The SSH Library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with the SSH Library; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#include <libssh/libssh.h>
+#include <stdio.h>
+
+int main(int argc, char **argv){
+ (void) argc;
+ (void) argv;
+ printf("bench_scp\n");
+ return 0;
+}