Created
December 20, 2012 08:00
-
-
Save turboladen/4343667 to your computer and use it in GitHub Desktop.
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 '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