File tree Expand file tree Collapse file tree
tensorflow/python/platform Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,11 +73,6 @@ def _global_report_benchmark(
7373 cpu_time is not None else - 1 , throughput if
7474 throughput is not None else - 1 , str (extras ) if extras else "" )
7575
76- test_env = os .environ .get (TEST_REPORTER_TEST_ENV , None )
77- if test_env is None :
78- # Reporting was not requested
79- return
80-
8176 entries = test_log_pb2 .BenchmarkEntries ()
8277 entry = entries .entry .add ()
8378 entry .name = name
@@ -96,6 +91,12 @@ def _global_report_benchmark(
9691 else :
9792 entry .extras [k ].string_value = str (v )
9893
94+ test_env = os .environ .get (TEST_REPORTER_TEST_ENV , None )
95+ if test_env is None :
96+ # Reporting was not requested, just print the proto
97+ print (str (entries ))
98+ return
99+
99100 serialized_entry = entries .SerializeToString ()
100101
101102 mangled_name = name .replace ("/" , "__" )
You can’t perform that action at this time.
0 commit comments