Sha256: f22e1d0d4f9505cef7906562884fe75e3b9e81c46cda02b3719ec962db2d852b

Contents?: true

Size: 973 Bytes

Versions: 4

Compression:

Stored size: 973 Bytes

Contents

#!/bin/bash

set -e

echo 'Starting test of rails application...'
# Start the rails application
echo 'Starting rails application...'
pushd example/rails_app >/dev/null
bundle >/dev/null
bin/rails db:environment:set RAILS_ENV=development
bundle exec rake db:reset
bundle exec unicorn -c config/unicorn.rb -E development -D
sleep 1
popd >/dev/null
echo 'Rails application started'

# Test publishing via the rails application
siege -c 10 -r 10 -b "http://localhost:8080/beavers POST beaver[name]=`date '+%m/%d/%y %H:%M:%S'`"
sleep 4

# Stop the rails application
echo 'Stopping rails application...'
pushd example/rails_app >/dev/null
kill `cat tmp/pids/unicorn.pid`
popd >/dev/null
echo 'Rails application stopped'
echo 'Rails application test complete'
echo ''
echo ''

# Test standalone publishing and consuming
echo 'Starting standalone publishing and consuming benchmark...'
pushd example/non_rails_app >/dev/null
bin/benchmark
popd >/dev/null
echo 'Benchmark complete'

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rabbit_feed-3.0.3 run_benchmark
rabbit_feed-3.0.2 run_benchmark
rabbit_feed-3.0.1 run_benchmark
rabbit_feed-3.0.0 run_benchmark