| 489 | RUN_FANIN_FANOUT_BENCHMARK(BM_GraphViewGetFanoutEdges); |
| 490 | |
| 491 | static void BM_GraphViewGetFaninEdges(int iters, int num_fanins, |
| 492 | int num_fanouts) { |
| 493 | testing::StopTiming(); |
| 494 | const GraphDef graph_def = test::CreateFaninFanoutNodeGraph( |
| 495 | num_fanins, num_fanouts, num_fanins, num_fanouts, |
| 496 | /*fanout_unique_index=*/true); |
| 497 | GraphView graph_view(&graph_def); |
| 498 | |
| 499 | testing::StartTiming(); |
| 500 | for (int i = 0; i < iters; ++i) { |
| 501 | const NodeDef* node = graph_view.GetNode("node"); |
| 502 | graph_view.GetFaninEdges(*node, /*include_controlling_edges=*/false); |
| 503 | } |
| 504 | testing::StopTiming(); |
| 505 | } |
| 506 | |
| 507 | RUN_FANIN_FANOUT_BENCHMARK(BM_GraphViewGetFaninEdges); |
| 508 |
nothing calls this directly
no test coverage detected