Skip to content

Commit

Permalink
toplev: Handle perf outputting some floating point numbers in locale
Browse files Browse the repository at this point in the history
format

Fixes andikleen#43
  • Loading branch information
Andi Kleen committed Dec 27, 2015
1 parent 79af177 commit 4989ffa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions toplev.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,12 +899,12 @@ def do_execute(runner, events, out, rest, res, rev, valstats, env):
# ,xxx% -> -rXXX stddev
stddev = 0.
if len(n) > off and n[off].endswith("%"):
stddev = (float(n[off].replace("%", "")) / 100.) * val
stddev = (float(n[off].replace("%", "").replace(",", ".")) / 100.) * val
off += 1

# ,xxx,yyy -> multiplexing in newer perf
if len(n) > off + 1:
multiplex = float(n[off + 1])
multiplex = float(n[off + 1].replace(",", "."))
off += 2

st = ValStat(stddev=stddev, multiplex=multiplex)
Expand Down

0 comments on commit 4989ffa

Please sign in to comment.