mirror of
https://github.com/qicosmos/rest_rpc.git
synced 2026-08-30 00:50:48 +08:00
add benchmark test.
This commit is contained in:
@@ -84,6 +84,7 @@ void async_echo(rpc_conn conn, const std::string& src) {
|
||||
}
|
||||
|
||||
std::string echo(rpc_conn conn, const std::string& src) {
|
||||
g_qps.increase();
|
||||
return src;
|
||||
}
|
||||
|
||||
@@ -98,7 +99,14 @@ void test_ssl() {
|
||||
server.run();
|
||||
}
|
||||
|
||||
void benchmark_test(){
|
||||
rpc_server server(9000, std::thread::hardware_concurrency());
|
||||
server.register_handler("echo", echo);
|
||||
server.run();
|
||||
}
|
||||
|
||||
int main() {
|
||||
// benchmark_test();
|
||||
rpc_server server(9000, std::thread::hardware_concurrency());
|
||||
|
||||
dummy d;
|
||||
|
||||
Reference in New Issue
Block a user