diff options
author | A. Unique TensorFlower <nobody@tensorflow.org> | 2016-04-22 06:25:17 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-04-22 07:31:52 -0700 |
commit | 9668b2981c32ebd804feed9970d7e95c8573e644 (patch) | |
tree | 7f5349d66de85015a29d6b33fe09250c5ff8efb4 /tensorflow/tools/test | |
parent | e9db74626ea9e46a93eb0c15c37a2e138c83fade (diff) |
Change tensorflow benchmark code to export results as serialized proto instead
of text proto. This simplifies ues of LITE_RUNTIME for mobile, where text
functions are not available natively.
Change: 120545368
Diffstat (limited to 'tensorflow/tools/test')
-rw-r--r-- | tensorflow/tools/test/run_and_gather_logs_lib.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tensorflow/tools/test/run_and_gather_logs_lib.py b/tensorflow/tools/test/run_and_gather_logs_lib.py index d6bc10dec9..250c964b7b 100644 --- a/tensorflow/tools/test/run_and_gather_logs_lib.py +++ b/tensorflow/tools/test/run_and_gather_logs_lib.py @@ -27,7 +27,6 @@ import time import tensorflow as tf -from google.protobuf import text_format from tensorflow.core.util import test_log_pb2 from tensorflow.tools.test import system_info_lib @@ -80,9 +79,9 @@ def process_test_logs(test_name, test_args, start_time, run_time, log_files): def process_benchmarks(log_files): benchmarks = test_log_pb2.BenchmarkEntries() for f in log_files: - content = tf.gfile.GFile(f).read() - entry = benchmarks.entry.add() - text_format.Merge(content, entry) + content = tf.gfile.GFile(f, "rb").read() + if benchmarks.MergeFromString(content) != len(content): + raise Exception("Failed parsing benchmark entry from %s" % f) return benchmarks |