#include "rgw_process.h"
#include "rgw_loadgen.h"
#include "rgw_client_io.h"
+#include "rgw_signal.h"
#include <atomic>
#define dout_subsys ceph_subsys_rgw
-extern void signal_shutdown();
+using namespace std;
void RGWLoadGenProcess::checkpoint()
{
delete[] objs;
- signal_shutdown();
+ rgw::signal::signal_shutdown();
} /* RGWLoadGenProcess::run() */
void RGWLoadGenProcess::gen_request(const string& method,
int content_length, std::atomic<bool>* fail_flag)
{
RGWLoadGenRequest* req =
- new RGWLoadGenRequest(store->getRados()->get_new_req_id(), method, resource,
+ new RGWLoadGenRequest(env.driver->get_new_req_id(), method, resource,
content_length, fail_flag);
dout(10) << "allocated request req=" << hex << req << dec << dendl;
req_throttle.get(1);
{
RGWLoadGenRequest* req = static_cast<RGWLoadGenRequest*>(r);
- RGWLoadGenRequestEnv env;
+ RGWLoadGenRequestEnv renv;
utime_t tm = ceph_clock_now();
- env.port = 80;
- env.content_length = req->content_length;
- env.content_type = "binary/octet-stream";
- env.request_method = req->method;
- env.uri = req->resource;
- env.set_date(tm);
- env.sign(dpp, access_key);
+ renv.port = 80;
+ renv.content_length = req->content_length;
+ renv.content_type = "binary/octet-stream";
+ renv.request_method = req->method;
+ renv.uri = req->resource;
+ renv.set_date(tm);
+ renv.sign(dpp, access_key);
- RGWLoadGenIO real_client_io(&env);
+ RGWLoadGenIO real_client_io(&renv);
RGWRestfulIO client_io(cct, &real_client_io);
-
- int ret = process_request(store, rest, req, uri_prefix,
- *auth_registry, &client_io, olog,
+ int ret = process_request(env, req, uri_prefix, &client_io,
null_yield, nullptr, nullptr, nullptr);
if (ret < 0) {
/* we don't really care about return code */