def create_mock_overview_page_analysis(self): analysis = overview_page_pb2.OverviewPageAnalysis() # Add 3 rows for _ in range(0, 3): op = overview_page_pb2.OverviewTfOp() op.self_time_fraction = self.mock_tf_op.self_time_fraction op.cumulative_time_fraction = self.mock_tf_op.cumulative_time_fraction op.category = self.mock_tf_op.category op.name = self.mock_tf_op.name op.flop_rate = self.mock_tf_op.flop_rate analysis.top_device_ops.append(op) return analysis
def create_empty_overview_page_analysis(self): return overview_page_pb2.OverviewPageAnalysis()