Skip to content

Commit

Permalink
Fix display if proc title suffix is %
Browse files Browse the repository at this point in the history
  • Loading branch information
eric committed Feb 11, 2012
1 parent 691e265 commit 5999ac3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/metriks/reporter/proc_title.rb
Expand Up @@ -46,7 +46,9 @@ def generate_title
val = block.call
val = "%.#{@rounding}f" % val if val.is_a?(Float)

if suffix
if suffix == '%'
"#{name}: #{val}#{suffix}"
elsif suffix
"#{name}: #{val}/#{suffix}"
else
"#{name}: #{val}"
Expand Down

0 comments on commit 5999ac3

Please sign in to comment.