Skip to content

Instantly share code, notes, and snippets.

@samflores
Created November 8, 2011 15:26
Show Gist options
  • Save samflores/1348029 to your computer and use it in GitHub Desktop.
Save samflores/1348029 to your computer and use it in GitHub Desktop.
RSpec comparison
class Foo
def say
"Hello"
end
end
require 'foo'
describe Foo do
it "should say hello" do
Foo.new.say.should == "Hello"
end
end
rbx-2.0.0-dev
1.17s user 0.07s system 139% cpu 0.890 total
1.18s user 0.07s system 140% cpu 0.890 total
1.9.2-p290
0.51s user 0.11s system 99% cpu 0.620 total
0.50s user 0.11s system 99% cpu 0.614 total
1.9.3-p0
0.15s user 0.04s system 98% cpu 0.192 total
0.15s user 0.04s system 98% cpu 0.193 total
1.8.7-p352
0.10s user 0.03s system 96% cpu 0.136 total
0.09s user 0.04s system 96% cpu 0.134 total
@samflores
Copy link
Author

Na verdade minha intenção inicial não era comparar os diferentes frameworks de testes, mas comparar a execução, ou melhor a carga+execução, de um único framework (RSpec) em diferentes implementações do interpretador (MRI-{1.8.7,1.9.2,1.9.3} e Rubinius 2.0.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment