aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/profiling/microbenchmarks/bm_json.py
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-03-10 13:39:01 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-03-10 13:39:01 -0800
commit34887809493347c9455027f9ae7fa6023d6e9bcc (patch)
treebb4dec666adaf2f96ed63217c39d89c55a0e98d4 /tools/profiling/microbenchmarks/bm_json.py
parent9a514b58bd63215052ae5fd8e1f360e67b559ba0 (diff)
Handle floats in bm_json
Diffstat (limited to 'tools/profiling/microbenchmarks/bm_json.py')
-rw-r--r--tools/profiling/microbenchmarks/bm_json.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/profiling/microbenchmarks/bm_json.py b/tools/profiling/microbenchmarks/bm_json.py
index 604823712f..c48a63b791 100644
--- a/tools/profiling/microbenchmarks/bm_json.py
+++ b/tools/profiling/microbenchmarks/bm_json.py
@@ -103,11 +103,11 @@ _BM_SPECS = {
def numericalize(s):
if not s: return ''
if s[-1] == 'k':
- return int(s[:-1]) * 1024
+ return float(s[:-1]) * 1024
if s[-1] == 'M':
- return int(s[:-1]) * 1024 * 1024
+ return float(s[:-1]) * 1024 * 1024
if 0 <= (ord(s[-1]) - ord('0')) <= 9:
- return int(s)
+ return float(s)
assert 'not a number: %s' % s
def parse_name(name):