test/parser_comparison.rb in Sutto-marvin-0.4.0 vs test/parser_comparison.rb in Sutto-marvin-0.8.0.0
- old
+ new
@@ -10,11 +10,11 @@
":Angel PRIVMSG Wiz :Hello are you receiving this message ?",
":RelayBot!n=MarvinBo@203.161.81.201.static.amnet.net.au JOIN :#relayrelay",
":SuttoL!n=SuttoL@li6-47.members.linode.com PRIVMSG #relayrelay :testing...",
":wolfe.freenode.net 004 MarvinBot3000 wolfe.freenode.net hyperion-1.0.2b aAbBcCdDeEfFGhHiIjkKlLmMnNopPQrRsStTuUvVwWxXyYzZ01234569*@ bcdefFhiIklmnoPqstv"
]
-PARSERS = [Marvin::Parsers::RagelParser, Marvin::Parsers::SimpleParser, Marvin::Parsers::RegexpParser]
+PARSERS = [Marvin::Parsers::SimpleParser, Marvin::Parsers::RagelParser]
LINES.each do |line|
puts "Processing: #{line}"
puts ""
@@ -42,10 +42,10 @@
puts "==============="
puts ""
width = PARSERS.map { |p| p.name.length }.max + 2
-ITERATIONS = 1000
+ITERATIONS = 100
Benchmark.bm(width) do |b|
PARSERS.each do |parser|
b.report("#{parser.name}: ") do
LINES.each do |l|