aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/util/reporter.cc
diff options
context:
space:
mode:
authorGravatar Shashi Shekhar <shashishekhar@google.com>2018-04-06 16:58:18 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-04-06 17:00:44 -0700
commitdbfc3d5d364a61dcf8b2867aee6afd6dc387b34b (patch)
tree4d87b839d417c7b0101694cfe02ab354e81e5afc /tensorflow/core/util/reporter.cc
parentba17f2a81949a0b35a92a4d6f7704d0fb2917bd3 (diff)
Add methods to TestReporter to log extras for benchmarks.
PiperOrigin-RevId: 191960433
Diffstat (limited to 'tensorflow/core/util/reporter.cc')
-rw-r--r--tensorflow/core/util/reporter.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/tensorflow/core/util/reporter.cc b/tensorflow/core/util/reporter.cc
index ee38f81f3e..a595c9509e 100644
--- a/tensorflow/core/util/reporter.cc
+++ b/tensorflow/core/util/reporter.cc
@@ -47,6 +47,18 @@ Status TestReporter::Benchmark(int64 iters, double cpu_time, double wall_time,
return Status::OK();
}
+Status TestReporter::SetProperty(const string& name, const string& value) {
+ if (closed_) return Status::OK();
+ (*benchmark_entry_.mutable_extras())[name].set_string_value(value);
+ return Status::OK();
+}
+
+Status TestReporter::SetProperty(const string& name, double value) {
+ if (closed_) return Status::OK();
+ (*benchmark_entry_.mutable_extras())[name].set_double_value(value);
+ return Status::OK();
+}
+
Status TestReporter::Initialize() {
if (fname_.empty()) {
return Status::OK();