This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### ruby 1.9.3 + railsexpress patches + GC tuning + -march=native -O3 | |
time ruby script/rails r 'Post.count' | |
real 0m1.008s | |
user 0m0.820s | |
sys 0m0.180s | |
### jruby 1.7.2-dev 2012-12-12 + java 64bit 1.8.0-ea-b67 hotspot 25.0-b11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# bundle_exec.sh - emulate 'bundle exec' but with a shell script | |
# rather than a ruby script. Modifies the environment just like | |
# bundle exec would. | |
# | |
# Running "bundle exec ruby" starts a ruby in which then execs the | |
# command, 'ruby'. In JRuby 1.6, the command is started in a child | |
# process. When using a Foreman-like tool that has the ability to | |
# kill and/or restart such a command, only the parent will be killed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module God | |
module Conditions | |
class RestartFileTouched < PollCondition | |
attr_accessor :restart_file | |
def initialize | |
super | |
end | |
def process_start_time | |
Time.parse(`ps -o lstart -p #{self.watch.pid} --no-heading`) |