| 96 | } |
| 97 | |
| 98 | int main(int argc, char* argv[]) { |
| 99 | ::gflags::ParseCommandLineFlags(&argc, &argv, true); |
| 100 | |
| 101 | ::brpc::StartDummyServerAt(FLAGS_dummy_port); |
| 102 | |
| 103 | pending.expose("test_" + FLAGS_mode + "_pending"); |
| 104 | latency.expose("test_" + FLAGS_mode); |
| 105 | |
| 106 | if (FLAGS_mode == "babylon") { |
| 107 | babylon_queue.initialize(1L << 18, ::babylon::BthreadExecutor::instance(), |
| 108 | babylon_queue_consume); |
| 109 | } else if (FLAGS_mode == "bthread") { |
| 110 | ::bthread::ExecutionQueueOptions options; |
| 111 | ::bthread::execution_queue_start(&bthread_queue_id, &options, |
| 112 | bthread_queue_consume, nullptr); |
| 113 | } else { |
| 114 | return 0; |
| 115 | } |
| 116 | |
| 117 | run_loop(); |
| 118 | |
| 119 | return 0; |
| 120 | } |
nothing calls this directly
no test coverage detected