Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Try to use nailgun for jRuby build to speed things up.

  • Loading branch information...
commit e9b65a13fa9a24230a2127731f7dfb0942f6323c 1 parent cd96e6e
@myronmarston myronmarston authored
View
2  features/support/env.rb
@@ -20,7 +20,7 @@
set_env('RUBYOPT', '-I../../lib -rubygems')
# ideas taken from: http://blog.headius.com/2010/03/jruby-startup-time-tips.html
- set_env('JRUBY_OPTS', '-X-C') # disable JIT since these processes are so short lived
+ set_env('JRUBY_OPTS', '-X-C --ng') # disable JIT since these processes are so short lived
set_env('JAVA_OPTS', '-d32') # force jRuby to use client JVM for faster startup times
end
end
View
11 script/jruby_build.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+# start up a JRuby nailgun server (and ensure it shuts down on exit)
+ruby --ng-server > /dev/null 2>&1 &
+trap "script/shutdown_jruby_nailgun.rb" EXIT
+
+bundle exec cucumber
+# bundle install
+# bundle exec rake cucumber
+# bundle exec cucumber --profile wip
+
View
11 script/shutdown_jruby_nailgun.rb
@@ -0,0 +1,11 @@
+#!/usr/bin/env ruby
+
+possible_processes = `ps -o pid,command | grep jruby | grep [N]GServer`.split("\n")
+
+if possible_processes.size == 1
+ pid = possible_processes.first.strip.split(/\s+/).first.to_i
+ Process.kill(9, pid)
+else
+ raise "Did not find 1 process as expected. Found:\n#{possible_processes.join("\n")}"
+end
+
Please sign in to comment.
Something went wrong with that request. Please try again.