Commit 5e1cabb1 authored by Ge Jun's avatar Ge Jun

always show server mc on /status and not show method mc which is bvar now

parent c9a2a08c
...@@ -62,17 +62,19 @@ void StatusService::default_method(::google::protobuf::RpcController* cntl_base, ...@@ -62,17 +62,19 @@ void StatusService::default_method(::google::protobuf::RpcController* cntl_base,
server->PrintTabsBody(os, "status"); server->PrintTabsBody(os, "status");
os << "<div class=\"layer1\">\n"; os << "<div class=\"layer1\">\n";
} }
os << "version: " << server->version() << '\n';
// non_service_error // non_service_error
if (use_html) { if (use_html) {
os << "<p class=\"variable\">"; os << "<p class=\"variable\">";
} }
os << "non_service_error: "; os << "non_service_error: ";
if (use_html) { if (use_html) {
os << "<span id=\"value-" << server->_nerror.name() << "\">"; os << "<span id=\"value-" << server->_nerror_bvar.name() << "\">";
} }
os << server->_nerror.get_value(); os << server->_nerror_bvar.get_value();
if (use_html) { if (use_html) {
os << "</span></p><div class=\"detail\"><div id=\"" << server->_nerror.name() os << "</span></p><div class=\"detail\"><div id=\"" << server->_nerror_bvar.name()
<< "\" class=\"flot-placeholder\"></div></div>"; << "\" class=\"flot-placeholder\"></div></div>";
} }
os << '\n'; os << '\n';
...@@ -95,12 +97,14 @@ void StatusService::default_method(::google::protobuf::RpcController* cntl_base, ...@@ -95,12 +97,14 @@ void StatusService::default_method(::google::protobuf::RpcController* cntl_base,
<< "_connection_count\" class=\"flot-placeholder\"></div></div>"; << "_connection_count\" class=\"flot-placeholder\"></div></div>";
} }
os << '\n'; os << '\n';
const AdaptiveMaxConcurrency& max_concurrency =
server->options().max_concurrency; // max_concurrency
if (max_concurrency == "constant") { os << "max_concurrency: ";
os << "max_concurrency: " << static_cast<int>(max_concurrency) << '\n'; const int mc = server->options().max_concurrency;
if (mc <= 0) {
os << "unlimited";
} else { } else {
os << "concurrency limiter: " << max_concurrency.name() << '\n'; os << mc;
} }
os << '\n'; os << '\n';
...@@ -158,9 +162,6 @@ void StatusService::default_method(::google::protobuf::RpcController* cntl_base, ...@@ -158,9 +162,6 @@ void StatusService::default_method(::google::protobuf::RpcController* cntl_base,
if (mp->http_url) { if (mp->http_url) {
os << " @" << *mp->http_url; os << " @" << *mp->http_url;
} }
if (mp->status && mp->status->max_concurrency() > 0) {
os << " max_concurrency=" << mp->status->max_concurrency();
}
} }
os << "</h4>\n"; os << "</h4>\n";
} else { } else {
...@@ -170,9 +171,6 @@ void StatusService::default_method(::google::protobuf::RpcController* cntl_base, ...@@ -170,9 +171,6 @@ void StatusService::default_method(::google::protobuf::RpcController* cntl_base,
if (mp->http_url) { if (mp->http_url) {
os << " @" << *mp->http_url; os << " @" << *mp->http_url;
} }
if (mp->status && mp->status->max_concurrency() > 0) {
os << " max_concurrency=" << mp->status->max_concurrency();
}
} }
os << '\n'; os << '\n';
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment