| 454 | RUN_FANIN_FANOUT_BENCHMARK(BM_GraphViewGetFanouts); |
| 455 | |
| 456 | static void BM_GraphViewGetFanins(int iters, int num_fanins, int num_fanouts) { |
| 457 | testing::StopTiming(); |
| 458 | const GraphDef graph_def = test::CreateFaninFanoutNodeGraph( |
| 459 | num_fanins, num_fanouts, num_fanins, num_fanouts, |
| 460 | /*fanout_unique_index=*/true); |
| 461 | GraphView graph_view(&graph_def); |
| 462 | |
| 463 | testing::StartTiming(); |
| 464 | for (int i = 0; i < iters; ++i) { |
| 465 | const NodeDef* node = graph_view.GetNode("node"); |
| 466 | graph_view.GetFanins(*node, /*include_controlling_nodes=*/false); |
| 467 | } |
| 468 | testing::StopTiming(); |
| 469 | } |
| 470 | |
| 471 | RUN_FANIN_FANOUT_BENCHMARK(BM_GraphViewGetFanins); |
| 472 |
nothing calls this directly
no test coverage detected