mirror of
https://github.com/ceph/ceph
synced 2024-12-27 22:13:28 +00:00
rgw: enable 'qlen' & 'qactive' performance counters
when using the Civetweb and Beast frontends fixes: https://tracker.ceph.com/issues/23147 Signed-off-by: Mark Kogan <mkogan@redhat.com>
This commit is contained in:
parent
a0a001a8df
commit
fc1c19714b
@ -24,6 +24,9 @@ int ClientIO::init_env(CephContext *cct)
|
||||
{
|
||||
env.init(cct);
|
||||
|
||||
perfcounter->inc(l_rgw_qlen);
|
||||
perfcounter->inc(l_rgw_qactive);
|
||||
|
||||
const auto& request = parser.get();
|
||||
const auto& headers = request;
|
||||
for (auto header = headers.begin(); header != headers.end(); ++header) {
|
||||
@ -123,6 +126,8 @@ size_t ClientIO::read_data(char* buf, size_t max)
|
||||
|
||||
size_t ClientIO::complete_request()
|
||||
{
|
||||
perfcounter->inc(l_rgw_qlen, -1);
|
||||
perfcounter->inc(l_rgw_qactive, -1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -64,6 +64,8 @@ void RGWCivetWeb::flush()
|
||||
|
||||
size_t RGWCivetWeb::complete_request()
|
||||
{
|
||||
perfcounter->inc(l_rgw_qlen, -1);
|
||||
perfcounter->inc(l_rgw_qactive, -1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -117,6 +119,9 @@ int RGWCivetWeb::init_env(CephContext *cct)
|
||||
env.set(buf, value);
|
||||
}
|
||||
|
||||
perfcounter->inc(l_rgw_qlen);
|
||||
perfcounter->inc(l_rgw_qactive);
|
||||
|
||||
env.set("REMOTE_ADDR", info->remote_addr);
|
||||
env.set("REQUEST_METHOD", info->request_method);
|
||||
env.set("HTTP_VERSION", info->http_version);
|
||||
|
Loading…
Reference in New Issue
Block a user