26#include <boost/weak_ptr.hpp>
27#include <boost/shared_ptr.hpp>
138template<
typename Master_structured_channel_t>
262template<
typename Master_structured_channel_t>
264 m_master_channel(master_channel)
266 assert(master_channel &&
"Info_collector ctor: master_channel must be non-null.");
269template<
typename Master_structured_channel_t>
272 return !m_master_channel.expired();
275template<
typename Master_structured_channel_t>
280 const auto master_channel = m_master_channel.lock();
281 return master_channel ? master_channel->stats() : Channel_stats{};
284template<
typename Master_structured_channel_t>
287 const auto master_channel = m_master_channel.lock();
290 master_channel->stats_reset();
294template<
typename Master_structured_channel_t>
299 const auto master_channel = m_master_channel.lock();
300 return master_channel ? master_channel->owned_channel()->native_handle_send_stats()
304template<
typename Master_structured_channel_t>
307 const auto master_channel = m_master_channel.lock();
310 master_channel->owned_channel_mutable()->native_handle_send_stats_reset();
314template<
typename Master_structured_channel_t>
319 const auto master_channel = m_master_channel.lock();
320 return master_channel ? master_channel->owned_channel()->native_handle_receive_stats()
324template<
typename Master_structured_channel_t>
327 const auto master_channel = m_master_channel.lock();
330 master_channel->owned_channel_mutable()->native_handle_receive_stats_reset();
334template<
typename Master_structured_channel_t>
338 using flow::util::stat::print;
343 return os <<
"[session master channel gone; no stats avail]";
Bundles access to stats from the session master channel (SMC) – the internal struc::Channel each Sess...
bool master_channel_live() const
Returns whether the session master channel still exists; false means the source Session has been dest...
util::stat::Info_dump_format m_fmt
Formatting knobs for printing *this via ostream <<.
boost::shared_ptr< Master_structured_channel > Master_structured_channel_ptr
Short-hand for shared_ptr to Master_structured_channel.
transport::struc::stat::Channel_stats master_channel_stats() const
struc::Channel::stats() of the session master channel of the Session that spawned *this.
boost::weak_ptr< Master_structured_channel > Master_structured_channel_observer
Short-hand for weak_ptr observer of Master_structured_channel_ptr.
Info_collector(const Master_structured_channel_ptr &master_channel)
Constructs the collector, capturing a weak_ptr to the session master channel.
transport::stat::Blob_snd_stats master_channel_transport_snd_stats() const
Native_socket_stream::native_handle_snd_stats() of the transport channel powering the session master ...
Master_structured_channel_observer m_master_channel
weak_ptr to the session master channel.
void master_channel_transport_snd_stats_reset()
Native_socket_stream::native_handle_snd_stats_reset() of the transport channel powering the session m...
transport::stat::Blob_rcv_stats master_channel_transport_rcv_stats() const
Native_socket_stream::native_handle_rcv_stats() of the transport channel powering the session master ...
void master_channel_stats_reset()
struc::Channel::reset_stats() of the session master channel of the Session that spawned *this.
void master_channel_transport_rcv_stats_reset()
Native_socket_stream::native_handle_rcv_stats_reset() of the transport channel powering the session m...
Master_structured_channel_t Master_structured_channel
The concrete struc::Channel type of the session master channel.
Flow-IPC module providing the broad lifecycle and shared-resource organization – via the session conc...
std::ostream & operator<<(std::ostream &os, const App &val)
Prints string representation of the given App to the given ostream.
flow::util::String_view String_view
Short-hand for Flow's String_view.
This is the friend facade of Info_collector that exposes the private constructor, so that only intern...
Cumulative stats from the incoming-direction (receive) pipe of a Blob_receiver or Native_handle_recei...
Cumulative stats from the outgoing-direction (send) pipe of a Blob_sender or Native_handle_sender con...
Cumulative stats from a struc::Channel, composing the underlying sync_io::stat::Channel_stats with st...