Permalink
Browse files

added a test script to benchmark queueing messages

  • Loading branch information...
1 parent e03cfb4 commit fb187a318bf212a184f80bbb239ba477f782986a @pauldowman committed Jul 31, 2009
Showing with 20 additions and 0 deletions.
  1. +19 −0 test/benchmark-sqs-accelerator
  2. +1 −0 test/post-data
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# This script uses "ab" (the Apache benchmark tool) to benchmark sending
+# messages using an sqs_accelerator running locally.
+#
+# It runs for two minutes, use control-c to quit early.
+
+AWS_ACCESS_KEY_ID=$1
+AWS_SECRET_ACCESS_KEY=$2
+
+if [ -z "$AWS_ACCESS_KEY_ID" -o -z "$AWS_SECRET_ACCESS_KEY" ] ; then
+ echo "usage: benchmark-sqs-accelerator <aws_access_key> <aws_secret_access_key_id>"
+ exit 1
+fi
+
+URL=http://127.0.0.1:9292/queues/test
+POST_DATA_FILE="`dirname $0`/post-data"
+
+ab -A "$1:$2" -t 120 -c 10 -p "$POST_DATA_FILE" -T application/x-www-form-urlencoded "$URL"
View
@@ -0,0 +1 @@
+queue_name=test&message_body=test

0 comments on commit fb187a3

Please sign in to comment.