Skip to content

Instantly share code, notes, and snippets.

@bogdan
Created April 4, 2012 12:07
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 bogdan/6b84d985c4e2b29dbb80 to your computer and use it in GitHub Desktop.
Save bogdan/6b84d985c4e2b29dbb80 to your computer and use it in GitHub Desktop.
rb.rb
require 'diffbench'
$LOAD_PATH << "./lib"
require "mail"
DiffBench.bm do
report("headers parsing when long") do
Mail::Header.new("X-Subscriber: 1111\n"* 1000)
end
report("headers parsing when tiny") do
10.times do
Mail::Header.new("X-Subscriber: 1111\n"* 10)
end
end
report("headers parsing when empty") do
100.times do
Mail::Header.new("")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment