Skip to content

Instantly share code, notes, and snippets.

@turboladen
Created December 20, 2012 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save turboladen/4343667 to your computer and use it in GitHub Desktop.
Save turboladen/4343667 to your computer and use it in GitHub Desktop.
require 'fileutils'
require 'benchmark'
require './lib/pants'
Benchmark.bm do |x|
Pants::Logger.log = false
x.report("pants:") do
tee = Pants.new("/Users/Steveloveless/Music/iTunes/iTunes Media/Music/Ana Voog/Hollywood/01 Hollywood (Juno Reactor 7_ Mix).mp3") do |tee|
100.times do |i|
tee.add_writer("test#{i}.mp3")
end
end
tee.run
end
x.report("FileUtils.cp:") do
100.times do |i|
FileUtils.cp('test1.mp3', "bobo#{i}.mp3")
end
end
end
FileUtils.rm Dir["./bobo*.mp3"]
FileUtils.rm Dir["./test*.mp3"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment