| | |
| | | // query procs with normal topic request |
| | | MsgRequestTopic req; |
| | | req.set_topic("@center_query_procs"); |
| | | // req.set_data("{\"proc_id\":\"#center.node\"}"); |
| | | std::string s(req.SerializeAsString()); |
| | | // Sleep(10ms, false); |
| | | std::string dest(BHAddress().SerializeAsString()); |
| | |
| | | threads.Launch(hb, &run); |
| | | threads.Launch(showStatus, &run); |
| | | int ncli = 10; |
| | | const int64_t nreq = 10; //00 * 100; |
| | | const int64_t nreq = 1000 * 100; |
| | | |
| | | for (int i = 0; i < 10; ++i) { |
| | | SyncRequest(i); |
| | |
| | | } |
| | | } |
| | | |
| | | Sleep(1s); |
| | | |
| | | run = false; |
| | | threads.WaitAll(); |
| | | auto &st = Status(); |
| | | Sleep(1s); |
| | | printf("nreq: %8ld, nsrv: %8ld, nreply: %8ld\n", st.nrequest_.load(), st.nserved_.load(), st.nreply_.load()); |
| | | BHCleanup(); |
| | | printf("after cleanup\n"); |