This is an automated email from the ASF dual-hosted git repository.
lorinlee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git
The following commit(s) were added to refs/heads/master by this push:
new dd7faed rpc_view support setting timeout
new 8dc52a7 Merge pull request #1459 from serverglen/rpc_view
dd7faed is described below
commit dd7faed025f44f4e770b8066704226d3401d4f05
Author: serverglen <[email protected]>
AuthorDate: Fri Jul 2 22:36:53 2021 +0800
rpc_view support setting timeout
---
tools/rpc_view/rpc_view.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/rpc_view/rpc_view.cpp b/tools/rpc_view/rpc_view.cpp
index a3a7864..e060713 100644
--- a/tools/rpc_view/rpc_view.cpp
+++ b/tools/rpc_view/rpc_view.cpp
@@ -24,6 +24,7 @@
DEFINE_int32(port, 8888, "TCP Port of this server");
DEFINE_string(target, "", "The server to view");
+DEFINE_int32(timeout_ms, 5000, "Timeout for calling the server to view");
// handle HTTP response of accessing builtin services of the target server.
static void handle_response(brpc::Controller* client_cntl,
@@ -135,7 +136,7 @@ public:
// query "seconds", we set the timeout to be longer than "seconds".
const std::string* seconds =
server_cntl->http_request().uri().GetQuery("seconds");
- int64_t timeout_ms = 5000;
+ int64_t timeout_ms = FLAGS_timeout_ms;
if (seconds) {
timeout_ms += atoll(seconds->c_str()) * 1000;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]