| 437 | RUN_FANIN_FANOUT_BENCHMARK(BM_GraphViewGetRegularFanin); |
| 438 | |
| 439 | static void BM_GraphViewGetFanouts(int iters, int num_fanins, int num_fanouts) { |
| 440 | testing::StopTiming(); |
| 441 | const GraphDef graph_def = test::CreateFaninFanoutNodeGraph( |
| 442 | num_fanins, num_fanouts, num_fanins, num_fanouts, |
| 443 | /*fanout_unique_index=*/true); |
| 444 | GraphView graph_view(&graph_def); |
| 445 | |
| 446 | testing::StartTiming(); |
| 447 | for (int i = 0; i < iters; ++i) { |
| 448 | const NodeDef* node = graph_view.GetNode("node"); |
| 449 | graph_view.GetFanouts(*node, /*include_controlled_nodes=*/false); |
| 450 | } |
| 451 | testing::StopTiming(); |
| 452 | } |
| 453 | |
| 454 | RUN_FANIN_FANOUT_BENCHMARK(BM_GraphViewGetFanouts); |
| 455 |
nothing calls this directly
no test coverage detected