Skip to content

Commit

Permalink
Add improvement section
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan committed May 22, 2012
1 parent f51ef12 commit 354e2cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions lib/diffbench.rb
Expand Up @@ -55,9 +55,9 @@ def run
color_string = result_color(improvement)
output "After patch: #{after_patch.format}"
output "Before patch: #{before_patch.format}"
#if color_string
#output self.class.color("Improvement: #{improvement}%", color_string).strip
#end
if color_string
output self.class.color("Improvement: #{improvement}%", color_string).strip
end
output ""
end
end
Expand Down
8 changes: 4 additions & 4 deletions spec/diffbench_spec.rb
Expand Up @@ -46,10 +46,12 @@ def to_regexp(output)
--------------------------------------------------Sleeper 1
After patch: 0.000000 0.000000 0.000000 ( 0.100NUM)
Before patch: 0.000000 0.000000 0.000000 ( 0.200NUM)
#{DiffBench::Runner.color("Improvement: 50%", :green)}
--------------------------------------------------Sleeper 2
After patch: 0.000000 0.000000 0.000000 ( 0.100NUM)
Before patch: 0.000000 0.000000 0.000000 ( 0.200NUM)
#{DiffBench::Runner.color("Improvement: 50%", :green)}
OUT
end

Expand All @@ -76,15 +78,13 @@ def to_regexp(output)
--------------------------------------------------Sleeper 1
After patch: 0.000000 0.000000 0.000000 ( 0.100NUM)
Before patch: 0.000000 0.000000 0.000000 ( 0.200NUM)
#{DiffBench::Runner.color("Improvement: 50%", :green)}
--------------------------------------------------Sleeper 2
After patch: 0.000000 0.000000 0.000000 ( 0.100NUM)
Before patch: 0.000000 0.000000 0.000000 ( 0.200NUM)
#{DiffBench::Runner.color("Improvement: 50%", :green)}
OUT




end
end
end
Expand Down

0 comments on commit 354e2cf

Please sign in to comment.