| 783 | BENCHMARK(BM_ToGraphDef)->ArgPair(1 << 15, 16); |
| 784 | |
| 785 | static void BM_RemoveNode(int iters, int num_nodes, int num_edges_per_node) { |
| 786 | testing::StopTiming(); |
| 787 | const GraphDef graph_def = |
| 788 | test::CreateGraphDef(num_nodes, num_edges_per_node); |
| 789 | const auto registry = OpRegistry::Global(); |
| 790 | GraphConstructorOptions opts; |
| 791 | for (int i = 0; i < iters; ++i) { |
| 792 | Graph graph(registry); |
| 793 | TF_CHECK_OK(ConvertGraphDefToGraph(opts, graph_def, &graph)); |
| 794 | testing::StartTiming(); |
| 795 | for (Node* n : graph.op_nodes()) { |
| 796 | graph.RemoveNode(n); |
| 797 | } |
| 798 | testing::StopTiming(); |
| 799 | } |
| 800 | } |
| 801 | BENCHMARK(BM_RemoveNode)->ArgPair(10, 2); |
| 802 | BENCHMARK(BM_RemoveNode)->ArgPair(1 << 6, 2); |
| 803 | BENCHMARK(BM_RemoveNode)->ArgPair(1 << 9, 2); |
nothing calls this directly
no test coverage detected