teamon

  • Archive
  • RSS
  • Ask me anything

2,5 times faster heckle

RSpec has built-in support for heckle, but executing every “$ spec spec_file —heckle my_method” from command line is boring.

Why not use rake?

Yeah, nice one! Well, not really. “$ rake heckle_all” takes about 87 seconds to complete. First line executes shell script “spec” that runs ruby, then spec with heckle, then next line starts its own ruby again and again. Ruby starts slowly. Can it be done better?.

Yes! After some hacking I ended up with something like this:

Woohoo, “$ rake heckle_all” now takes “only” 33 seconds. Thats 2,5 times faster! ;]

Yes, I know, nothing to be excited about, but imagine you have some more code. One hour instead of two and a half! Isn`t that impressive?

It couldn`t be a benchmark post without nice chart

    • #ruby
    • #rspec
    • #heckle
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Recent comments

Blog comments powered by Disqus
← Previous • Next →

About

Ruby, Scala and others.

Pages

  • About
  • Projects
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr