mirror of
https://github.com/ceph/ceph
synced 2024-12-27 05:53:20 +00:00
Merge pull request #20842 from mkogan1/wip-rgw-23147
rgw: enable 'qlen' & 'qactive' performance counters Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
commit
6329d44301
@ -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;
|
||||
}
|
||||
|
||||
|
@ -75,6 +75,8 @@ void RGWCivetWeb::flush()
|
||||
|
||||
size_t RGWCivetWeb::complete_request()
|
||||
{
|
||||
perfcounter->inc(l_rgw_qlen, -1);
|
||||
perfcounter->inc(l_rgw_qactive, -1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -128,6 +130,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