From owner-svn-src-all@freebsd.org Fri Sep 2 21:35:34 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1ED11BCD87D; Fri, 2 Sep 2016 21:35:34 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3D74E; Fri, 2 Sep 2016 21:35:33 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u82LZXXh014838; Fri, 2 Sep 2016 21:35:33 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u82LZX7k014837; Fri, 2 Sep 2016 21:35:33 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201609022135.u82LZX7k014837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Fri, 2 Sep 2016 21:35:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305307 - head/tools/tools/crypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2016 21:35:34 -0000 Author: gnn Date: Fri Sep 2 21:35:32 2016 New Revision: 305307 URL: https://svnweb.freebsd.org/changeset/base/305307 Log: Add a runner script for cryptotest. Althought cryptotest itself has a -z mode to test all algorithms at a variety of sizes, this script allows us to be more selective. Threads and buffer sizes move in powers of two from 1, for threads, and 256 for buffer sizes. e.g. cryptorun.sh aes 4 512 Test aes with 1, 2 and 4 processes, and at sizes of 256 and 512 bytes. Sponsored by: Rubicon Communications, LLC (Netgate) Added: head/tools/tools/crypto/cryptorun.sh (contents, props changed) Added: head/tools/tools/crypto/cryptorun.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/crypto/cryptorun.sh Fri Sep 2 21:35:32 2016 (r305307) @@ -0,0 +1,32 @@ +#!/bin/sh +# +# A simple test runner for cryptotest +# +# Althought cryptotest itself has a -z mode to test all algorithms at +# a variety of sizes, this script allows us to be more selective. +# Threads and buffer sizes move in powers of two from 1, for threads, +# and 256 for buffer sizes. +# +# e.g. cryptorun.sh aes 4 512 +# +# Test aes with 1, 2 and 4 processes, and at sizes of 256 and 512 bytes. +# +# $FreeBSD$ +# + +threads=1 +size=256 +iterations=1000000 +crypto="/tank/users/gnn/Repos/svn/FreeBSD.HEAD/tools/tools/crypto/cryptotest" +max_threads=$2 +max_size=$3 + +while [ "$threads" -le "$max_threads" ]; do + echo "Testing with $threads processes." + while [ "$size" -le "$max_size" ]; do + $crypto -t $threads -a $1 $iterations $size + size=$(($size * 2)) + done + size=256 + threads=$(($threads * 2)) +done