| 28 | namespace tensorflow { |
| 29 | namespace { |
| 30 | GraphDef MakeGraphDef(int num_nodes) { |
| 31 | GraphDef graph_def; |
| 32 | for (int i = 0; i < num_nodes; ++i) { |
| 33 | NodeDef* node = graph_def.add_node(); |
| 34 | node->set_name(strings::StrCat("node", i)); |
| 35 | node->set_op(strings::StrCat("op", i % 10)); |
| 36 | (*node->mutable_attr())["foo"].set_f(3.14f); |
| 37 | (*node->mutable_attr())["bar"].set_s("baz"); |
| 38 | } |
| 39 | return graph_def; |
| 40 | } |
| 41 | } // namespace |
| 42 | |
| 43 | static void BM_ProtoSerializationToString(int iters, int num_nodes) { |
no test coverage detected