IOInterruptCondition, osd_op_errorator>;
object_stat_sum_t delta_stats;
+
+ size_t get_bytes_written() {
+ return txn.get_num_bytes();
+ }
private:
// with_effect can be used to schedule operations to be performed
// at commit time. effects will be discarded if the operation does
: shard_services(&_shard_services),
l_conn(std::move(conn)),
m(std::move(m)),
+ begin_time(std::chrono::steady_clock::now()),
instance_handle(new instance_handle_t)
{}
co_return;
}
+ size_t inb = 0, outb = 0;
{
auto all_completed = interruptor::now();
if (ret) {
// simply return the error below, leaving all_completed alone
} else {
auto submitted = interruptor::now();
+ inb = ox.get_bytes_written();
std::tie(submitted, all_completed) = co_await pg->submit_executer(
std::move(ox), m->ops);
co_await std::move(submitted);
reply->set_result(osdop.rval);
break;
}
+ outb += osdop.outdata.length();
}
}
+ pg->add_client_request_lat(
+ *this,
+ inb,
+ outb,
+ utime_t{std::chrono::steady_clock::now() - begin_time});
reply->set_enoent_reply_versions(
pg->peering_state.get_info().last_update,
pg->peering_state.get_info().last_user_version);
OpInfo op_info;
seastar::promise<> on_complete;
unsigned instance_id = 0;
+ std::chrono::time_point<std::chrono::steady_clock> begin_time;
public:
epoch_t get_epoch_sent_at() const {
return m->get_map_epoch();
}
+ bool may_write() const { return op_info.may_write(); }
+ bool may_cache() const { return op_info.may_cache(); }
+ bool may_read() const { return op_info.may_read(); }
+ template <typename T>
+ T* get_req() const {
+ static_assert(std::is_same_v<T, MOSDOp>);
+ return m.get();
+ }
+ const crimson::net::ConnectionRef &get_connection() const {
+ return l_conn;
+ }
+
/**
* instance_handle_t
*
#include "crimson/osd/object_context.h"
#include "osd/PeeringState.h"
#include "osd/SnapMapper.h"
+#include "osd/DynamicPerfStats.h"
#include "crimson/common/interruptible_future.h"
#include "crimson/common/log.h"
private:
std::optional<pg_stat_t> pg_stats;
+ DynamicPerfStats dp_stats;
public:
+ void add_client_request_lat(
+ const ClientRequest& req,
+ size_t inb,
+ size_t outb,
+ const utime_t &lat) {
+ dp_stats.add(pg_whoami.osd, get_info(), req, inb, outb, lat);
+ }
OSDriver &get_osdriver() final {
return osdriver;
}