Go to the documentation of this file.
13 #include <string_view>
30 return Consumer::initialize().
andThen( [
this]() {
42 return Consumer::finalize();
50 warning() <<
"Starting perf profile at event " << eventNumber <<
endmsg;
55 warning() <<
"Stopping perf profile at event " << eventNumber <<
endmsg;
62 if ( ::write(
m_fifo,
s.data(),
s.size() ) < ssize_t(
s.size() ) ) {
63 error() <<
"Write of \"" <<
s <<
"\" to FIFO failed: " << ::strerror( errno ) <<
endmsg;
72 "After what event we start profiling." };
74 this,
"StopAtEventN", 0,
75 "After what event we stop profiling. If 0 than we also profile finalization stage. Default = 0." };
details::Consumer< Signature, Traits_, details::isLegacy< Traits_ > > Consumer
StatusCode andThen(F &&f, ARGS &&... args) const
Chain code blocks making the execution conditional a success result.
Gaudi::Property< std::string > m_fifoPath
Gaudi::Property< unsigned long > m_nStopAtEvent
StatusCode finalize() override
const ValueType & value() const
StatusCode initialize() override
void operator()() const override
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
constexpr static const auto SUCCESS
std::atomic< long unsigned > m_eventNumber
#define DECLARE_COMPONENT(type)
Algorithm to enable/disable profiling with Linux perf at given events.
constexpr static const auto FAILURE
Gaudi::Property< unsigned long > m_nStartFromEvent
void fifo_write(std::string_view s) const