Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 70 lines (59 sloc) 1.56 KB
#!/bin/bash
set -e
cd /ruby-bench-suite
git fetch origin
git rebase origin/master
git submodule init
git submodule update
cd /ruby
git fetch origin
git rebase origin/trunk
if [ -z "$RUBY_COMMIT_HASH" ]; then
echo "Running benchmarks using lastest Ruby commit"
else
echo "Running benchmarks using Ruby commit $RUBY_COMMIT_HASH"
git reset --hard $RUBY_COMMIT_HASH
fi
autoconf
./configure --disable-install-doc --quiet
make --quiet -j
make install --quiet -j
rbenv global system
gem install benchmark_driver -v 0.14.6
gem install benchmark_driver-output-rubybench -v 0.2.6
cd /
if [ "$INCLUDE_PATTERNS" ]; then
PATTERNS="--pattern $INCLUDE_PATTERNS"
fi
if [ "$RUBY_BENCHMARKS" = true ]; then
ruby /ruby-bench-suite/ruby/driver.rb \
--repeat-count 1 \
--runner ips \
--with-jit \
$PATTERNS
else
echo "Skipping Ruby benchmarks"
fi
if [ "$RUBY_MEMORY_BENCHMARKS" = true ]; then
ruby /ruby-bench-suite/ruby/driver.rb \
--repeat-count 1 \
--runner rsskb \
$PATTERNS
else
echo "Skipping Ruby memory benchmarks"
fi
if [ "$OPTCARROT_BENCHMARK" = true ]; then
echo "Running optcarrot benchmarks with Ruby $RUBY_VERSION"
ruby /ruby-bench-suite/optcarrot_benchmarks/driver.rb
else
echo "Skipping optcarrot benchmarks"
fi
if [ "$LIQUID_BENCHMARK" = true ]; then
echo "Running liquid benchmarks with Ruby $RUBY_VERSION"
gem install bundler --no-ri --no-rdoc
cd /ruby-bench-suite/liquid_benchmarks/liquid
bundle install --without test
bundle exec ruby /ruby-bench-suite/liquid_benchmarks/driver.rb
else
echo "Skipping liquid benchmarks"
fi