Down integrate to GitHub
diff --git a/benchmarks/util/result_parser.py b/benchmarks/util/result_parser.py
index fe19c85..b09f387 100755
--- a/benchmarks/util/result_parser.py
+++ b/benchmarks/util/result_parser.py
@@ -18,7 +18,7 @@
return __file_size_map[filename]
benchmark_dataset = benchmarks_pb2.BenchmarkDataset()
benchmark_dataset.ParseFromString(
- open(filename).read())
+ open(filename, "rb").read())
size = 0
count = 0
for payload in benchmark_dataset.payload:
@@ -60,7 +60,7 @@
return
if filename[0] != '/':
filename = os.path.dirname(os.path.abspath(__file__)) + '/' + filename
- with open(filename) as f:
+ with open(filename, "rb") as f:
results = json.loads(f.read())
for benchmark in results["benchmarks"]:
data_filename = "".join(
@@ -95,7 +95,7 @@
return
if filename[0] != "/":
filename = os.path.dirname(os.path.abspath(__file__)) + "/" + filename
- with open(filename) as f:
+ with open(filename, "rb") as f:
results = json.loads(f.read())
for benchmark in results["benchmarks"]:
__results.append({
@@ -125,7 +125,7 @@
return
if filename[0] != '/':
filename = os.path.dirname(os.path.abspath(__file__)) + '/' + filename
- with open(filename) as f:
+ with open(filename, "rb") as f:
results_list = json.loads(f.read())
for results in results_list:
for result in results:
@@ -175,7 +175,7 @@
return
if filename[0] != '/':
filename = os.path.dirname(os.path.abspath(__file__)) + '/' + filename
- with open(filename) as f:
+ with open(filename, "rb") as f:
results = json.loads(f.read())
for result in results:
total_weight = 0
@@ -211,7 +211,7 @@
return
if filename[0] != '/':
filename = os.path.dirname(os.path.abspath(__file__)) + '/' + filename
- with open(filename) as f:
+ with open(filename, "rb") as f:
for line in f:
result_list = re.split(r"[\ \t]+", line)
if result_list[0][:9] != "Benchmark":
@@ -251,7 +251,7 @@
return
if filename[0] != '/':
filename = os.path.dirname(os.path.abspath(__file__)) + '/' + filename
- with open(filename) as f:
+ with open(filename, "rb") as f:
results = json.loads(f.read())
for result in results:
_, avg_size = __get_data_size(result["filename"])