protected:
using OperationT<T>::OperationT;
+ struct StartEvent : TimeEvent<StartEvent> {};
+ struct CompletionEvent : TimeEvent<CompletionEvent> {};
+
template <class EventT, class... Args>
void track_event(Args&&... args) {
// the idea is to have a visitor-like interface that allows to double
// Just the boilerplate currently. Implementing
struct LttngBackend
- : ClientRequest::ConnectionPipeline::AwaitMap::BlockingEvent::Backend,
- OSD_OSDMapGate::OSDMapBlocker::BlockingEvent::Backend
+ : ClientRequest::StartEvent::Backend,
+ ClientRequest::ConnectionPipeline::AwaitMap::BlockingEvent::Backend,
+ OSD_OSDMapGate::OSDMapBlocker::BlockingEvent::Backend,
+ ClientRequest::CompletionEvent::Backend
{
+ void handle(ClientRequest::StartEvent&,
+ const Operation&) override {}
+
void handle(ClientRequest::ConnectionPipeline::AwaitMap::BlockingEvent& ev,
const Operation& op,
const ClientRequest::ConnectionPipeline::AwaitMap& blocker) override {
const Operation&,
const OSD_OSDMapGate::OSDMapBlocker&) override {
}
+
+ void handle(ClientRequest::CompletionEvent&,
+ const Operation&) override {}
};
} // namespace crimson::osd
{
logger().debug("{}: start", *this);
+ track_event<StartEvent>();
return seastar::repeat([this, opref=IRef{this}]() mutable {
logger().debug("{}: in repeat", *this);
return enter_stage(cp().await_map).then([this]() {
}
}, pgref);
});
+ }).then([this] {
+ track_event<CompletionEvent>();
});
}
public:
std::tuple<
+ StartEvent,
ConnectionPipeline::AwaitMap::BlockingEvent,
- OSD_OSDMapGate::OSDMapBlocker::BlockingEvent
+ OSD_OSDMapGate::OSDMapBlocker::BlockingEvent,
+ CompletionEvent
> tracking_events;
+
+ friend class LttngBackend;
+ friend class HistoricBackend;
};
}