int http_ret = 0;
string user = "-";
const auto started = ceph::coarse_real_clock::now();
+ ceph::coarse_real_clock::duration latency{};
process_request(env.store, env.rest, &req, env.uri_prefix,
*env.auth_registry, &client, env.olog, y,
- scheduler, &user, &http_ret);
+ scheduler, &user, &latency, &http_ret);
if (cct->_conf->subsys.should_gather(dout_subsys, 1)) {
// access log line elements begin per Apache Combined Log Format with additions following
<< client.get_bytes_sent() + client.get_bytes_received() << ' '
<< log_header{message, http::field::referer, "\""} << ' '
<< log_header{message, http::field::user_agent, "\""} << ' '
- << log_header{message, http::field::range} << dendl;
+ << log_header{message, http::field::range} << " latency="
+ << latency << dendl;
}
}
RGWRequest req(env.store->getRados()->get_new_req_id());
int http_ret = 0;
+ ceph::coarse_real_clock::duration latency{};
//assert (scheduler != nullptr);
int ret = process_request(env.store, env.rest, &req, env.uri_prefix,
*env.auth_registry, &client_io, env.olog,
- null_yield, scheduler.get(), nullptr, &http_ret);
+ null_yield, scheduler.get(), nullptr, &latency, &http_ret);
if (ret < 0) {
/* We don't really care about return code. */
dout(20) << "process_request() returned " << ret << dendl;
int ret = process_request(store, rest, req, uri_prefix,
*auth_registry, &client_io, olog,
- null_yield, nullptr, nullptr);
+ null_yield, nullptr, nullptr, nullptr);
if (ret < 0) {
/* we don't really care about return code */
dout(20) << "process_request() returned " << ret << dendl;
optional_yield yield,
rgw::dmclock::Scheduler *scheduler,
string* user,
+ ceph::coarse_real_clock::duration* latency,
int* http_ret)
{
int ret = client_io->init(g_ceph_context);
handler->put_op(op);
rest->put_handler(handler);
+ const auto lat = s->time_elapsed();
+ if (latency) {
+ *latency = lat;
+ }
+
dout(1) << "====== req done req=" << hex << req << dec
<< " op status=" << op_ret
<< " http_status=" << s->err.http_ret
- << " latency=" << s->time_elapsed()
+ << " latency=" << lat
<< " ======"
<< dendl;
optional_yield y,
rgw::dmclock::Scheduler *scheduler,
std::string* user,
+ ceph::coarse_real_clock::duration* latency,
int* http_ret = nullptr);
extern int rgw_process_authenticated(RGWHandler_REST* handler,