| 435 | } |
| 436 | |
| 437 | void BM_SendRecv(int iters) { |
| 438 | Rendezvous* rendez = NewLocalRendezvous(); |
| 439 | Tensor orig = V("val"); |
| 440 | Tensor val(DT_STRING, TensorShape({})); |
| 441 | bool is_dead = false; |
| 442 | Rendezvous::Args args; |
| 443 | if (iters > 0) { |
| 444 | while (iters--) { |
| 445 | TF_CHECK_OK(rendez->Send(KeyFoo(), args, orig, is_dead)); |
| 446 | TF_CHECK_OK(rendez->Recv(KeyFoo(), args, &val, &is_dead)); |
| 447 | } |
| 448 | CHECK_EQ(V(val), V(orig)); |
| 449 | } |
| 450 | rendez->Unref(); |
| 451 | } |
| 452 | BENCHMARK(BM_SendRecv); |
| 453 | |
| 454 | void BM_PingPong(int iters) { |
nothing calls this directly
no test coverage detected