Slice and dice Cucumber run-times
Inspired by The road to faster tests and Crank Your Specs, I decided to apply the delayed/enforced garbage collector technique to a fairly large Cucumber test suite that I have. Here's the code that goes in your env.rb file:
last_gc_run = Time.now
Before do
GC.disable
end
After do
if Time.now - last_gc_run > 2.0
GC.enable
GC.start
last_gc_run = Time.now
end
end
and the Cucumber and perftool.rb results from before the change:
74 scenarios (74 passed) 793 steps (793 passed) 3m19.785s Total: 9642 samples 2908 30.2% 30.2% 2908 30.2% garbage_collector 873 9.1% 39.2% 970 10.1% Timeout.timeout 386 4.0% 43.2% 1583 16.4% Open3.popen3
and after:
74 scenarios (74 passed) 793 steps (793 passed) 2m42.195s Total: 6828 samples 1085 15.9% 15.9% 1085 15.9% garbage_collector 583 8.5% 24.4% 697 10.2% Timeout.timeout 485 7.1% 31.5% 4877 71.4% Object#instance_exec
That's another minute or so of my life per test run that I'll put to good use somehow.
See what else is here...
- Jasmine and Vim, a happy pairing
- Fast JavaScript and CoffeeScript Unit Testing with jasmine-headless-webkit
- Actually Throwing One Away
- Slice and dice Cucumber run-times
- Site migrated and future plans
- Bash magic: convert a high-res PNG to a small PDF with convert and sam2p
- Bash magic: Get the chronological Originals contents from an iPhoto library that will fit on a CD
- What's the deal with "johncoswell"?
- Flex 3: Better SWF Embedding
- Ustreaming your desktop on Ubuntu Intrepid Ibex
- Mom's Delicious Pizza Dough Recipe
- LVPE: Avidemux and JPEG Photo AVI files not working?
- Guest strip!
- Dawn's Dictionary Drama is back!
- Video: The DC Conspiracy at Beyond Comics for Free Comic Book Day
- Joining the cartoon party: Myself as a Teen
- Quick Drying Paint: Profiling Inkscape using Valgrind
- LVPE: Encoding High Bitrate 24p Footage for DVD
- LVPE: Rendering and Exporting Video & Audio from Cinelerra
- LVPE: Processing a Bunch of Photos for Cinelerra
- LVPE: Color Correction in Cinelerra
- LVPE: Capturing & Deinterlacing DV Footage
- A Linux Video Production Experience
- Tons of .msp files in C:\Windows\Installer?
- A Moment of Inkscape Screenshots!
- The Amelia Rules! Charity Auction this Veterans Day
- PayPal and Visa: One card per account, ever?
- A Moment of Clarity Volume 2 Chapter 1 Reviewed!
- The Inkscape Perfect-Bound Cover Template Generator
- Freedom Dance wins in the 2007 Peer Awards!
- Untwisting the Spine of Perfect-Bound Books
- Small Press Expo 2007
- AMoC in Prismacolors and Brush Pens!
- Xinerama/TwinView + Single Screen + GTK = FAIL
- Baltimore Comic-Con
- ImageMagick: A simple, and kind of overkill, way to resize and pad an image
- Comics and Time Management
- Practical Inkscape for Comic Artists: The Right-Handed Illustration Keyboard Layout
- Red Hat High 2007 Update
- Cinelerra DV Rendering Problems? Try JPEG Photo
- Red Hat High 2007
- Freedom Dance!!
- One Reason Why Drawing Comics in Vector is Better Than in Bitmap
- Ogg Theora/Vorbis Conversion Information
- Linux iPod Video Conversion Information
- Libre Graphics Meeting 2007 - Creating Comics in Inkscape Presentation Video
- More Cinelerra and Mencoder fun!
- Libre Graphics Meeting 2007 - The Coswell Productions Report
- Libre Graphics Meeting 2007 - Wallpapers and Shirts!
- Indy Comic Review reviews A Moment of Clarity Volume 1
- Libre Graphics Meeting 2007
- Comics in Inkscape 0.45 with John Bintz
- Cinelerra Hints for Rendering
- Automating WinTV-PVR/ivtv captures in Ubuntu Edgy
- Inkscape 0.45 About Screen Content Entry
- Staircase Visualization for Volume 2
- Digital Minicomic Production - Using Free Software to Do Inexpensive Digital Paste-Up
- Blue Dot Television Commercial - A New Face
- Marylanders in Snow (Animation)
- Slippie Slide
- Blue Dot Television Commercial - Warm Up with Blue Dot
- TP Monitor
- Virus