| 402 | RUN_FANIN_FANOUT_BENCHMARK(BM_GraphViewGetFanout); |
| 403 | |
| 404 | static void BM_GraphViewGetFanin(int iters, int num_fanins, int num_fanouts) { |
| 405 | testing::StopTiming(); |
| 406 | const GraphDef graph_def = test::CreateFaninFanoutNodeGraph( |
| 407 | num_fanins, num_fanouts, num_fanins, num_fanouts, |
| 408 | /*fanout_unique_index=*/true); |
| 409 | GraphView graph_view(&graph_def); |
| 410 | |
| 411 | testing::StartTiming(); |
| 412 | for (int i = 0; i < iters; ++i) { |
| 413 | const NodeDef* node = graph_view.GetNode("node"); |
| 414 | graph_view.GetFanin({node, 0}); |
| 415 | } |
| 416 | testing::StopTiming(); |
| 417 | } |
| 418 | |
| 419 | RUN_FANIN_FANOUT_BENCHMARK(BM_GraphViewGetFanin); |
| 420 |
nothing calls this directly
no test coverage detected