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
C:\Documents and Settings\Administrator>ruby -v | |
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32] | |
C:\Documents and Settings\Administrator>gem install activerecord | |
Successfully installed activesupport-3.0.3 | |
Successfully installed builder-2.1.2 | |
Successfully installed i18n-0.5.0 | |
Successfully installed activemodel-3.0.3 | |
Successfully installed arel-2.0.6 | |
Successfully installed tzinfo-0.3.23 |
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
diff --git a/lib/em/spawnable.rb b/lib/em/spawnable.rb | |
index 2314213..ef64adc 100644 | |
--- a/lib/em/spawnable.rb | |
+++ b/lib/em/spawnable.rb | |
@@ -45,15 +45,11 @@ module EventMachine | |
end | |
alias_method :resume, :notify | |
alias_method :run, :notify # for formulations like (EM.spawn {xxx}).run | |
- #attr_accessor :receiver | |
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
### BEFORE | |
$ rake | |
(in /home/phiggins/projects/eventmachine-upstream) | |
no configuration section for specified version of Ruby (rbconfig-1.9.2) | |
no configuration section for specified version of Ruby (rbconfig-1.9.2) | |
no configuration section for specified version of Ruby (rbconfig-1.9.2) | |
no configuration section for specified version of Ruby (rbconfig-1.9.2) | |
cp tmp/x86_64-linux/rubyeventmachine/1.9.2/rubyeventmachine.so lib/rubyeventmachine.so | |
cp tmp/x86_64-linux/fastfilereaderext/1.9.2/fastfilereaderext.so lib/fastfilereaderext.so |
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
require 'eventmachine' | |
# Code adapted from EM's tests: | |
# https://github.com/eventmachine/eventmachine/blob/master/tests/test_processes.rb#L43 | |
ls = "" | |
EM.run { | |
d = EM::DeferrableChildProcess.open( "ruby -v" ) | |
d.callback {|data_from_child| | |
ls = data_from_child |
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
require 'eventmachine' | |
# Code adapted from here: | |
# https://github.com/eventmachine/eventmachine/blob/master/tests/test_inactivity_timeout.rb#L36 | |
start, finish = nil | |
timeout_handler = Module.new do | |
define_method :unbind do | |
finish = Time.now |
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
require 'eventmachine' | |
start, finish = nil | |
timeout_handler = Module.new do | |
define_method :unbind do | |
finish = Time.now | |
EM.stop | |
end | |
end |
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
# running the benchmark as-is | |
$ ruby benchmarks/excon_vs.rb | |
[curb (persistent), em-http-request, Excon/home/phiggins/projects/excon/lib/excon/response.rb:12:in `readline': end of file reached (Excon::Errors::SocketError) | |
from /home/phiggins/projects/excon/lib/excon/response.rb:12:in `parse' | |
from /home/phiggins/projects/excon/lib/excon/connection.rb:98:in `request' | |
from (eval):2:in `get' | |
from benchmarks/excon_vs.rb:94:in `block (3 levels) in <main>' | |
from /home/phiggins/.rvm/gems/ruby-1.9.2-p0/gems/tach-0.0.7/lib/tach.rb:63:in `call' |
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
require 'eventmachine' | |
require 'benchmark' | |
x = 0 | |
t = Benchmark.realtime do | |
EM.run do | |
EM.add_timer(1.5) { raise "OMG" } | |
time = EM.current_time + 0.002 |
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
# encoding: utf-8 | |
require 'hmac' | |
require 'hmac-sha2' | |
require 'base64' | |
require 'openssl' | |
class Sns | |
class AwsCredentials | |
attr_reader :access_key, :host |
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
$ TESTOPTS="-v" rake | grep '^Test.*#' | awk '{ print $2 " " $1 }' | sort -n | |
no configuration section for specified version of Ruby (rbconfig-1.9.2) | |
no configuration section for specified version of Ruby (rbconfig-1.9.2) | |
no configuration section for specified version of Ruby (rbconfig-1.9.2) | |
no configuration section for specified version of Ruby (rbconfig-1.9.2) | |
cp tmp/x86_64-linux/rubyeventmachine/1.9.2/rubyeventmachine.so lib/rubyeventmachine.so | |
cp tmp/x86_64-linux/fastfilereaderext/1.9.2/fastfilereaderext.so lib/fastfilereaderext.so | |
0.00 TestAttach#test_attach_pipe: | |
0.00 TestAttach#test_set_readable: | |
0.00 TestBasic#test_bubble_errors_from_initialize: |