SObjectizer 5.8
Loading...
Searching...
No Matches
ds_mbox_core_stats.cpp
Go to the documentation of this file.
1/*
2 * SObjectizer-5
3 */
4
5/*!
6 * \since
7 * v.5.5.4
8 *
9 * \file
10 * \brief A data source class for run-time monitoring of mbox_core.
11 */
12
13#include <so_5/stats/impl/ds_mbox_core_stats.hpp>
14
15#include <so_5/stats/messages.hpp>
16#include <so_5/stats/std_names.hpp>
17
18#include <so_5/send_functions.hpp>
19
20namespace so_5 {
21
22namespace stats {
23
24namespace impl {
25
26//
27// ds_mbox_core_stats_t
28//
30 so_5::impl::mbox_core_t & what )
31 : m_what( what )
32 {}
33
34void
36 const mbox_t & distribution_mbox )
37 {
38 auto stats = m_what.query_stats();
39
40 send< messages::quantity< std::size_t > >( distribution_mbox,
44 }
45
46} /* namespace impl */
47
48} /* namespace stats */
49
50} /* namespace so_5 */
mbox_core_stats_t query_stats()
Get statistics for run-time monitoring.
A data source for distributing information about mbox_core.
ds_mbox_core_stats_t(so_5::impl::mbox_core_t &what)
void distribute(const mbox_t &distribution_mbox) override
Send appropriate notification about the current value.
Details of SObjectizer run-time implementations.
Definition agent.cpp:780
Internal implementation of run-time monitoring and statistics related stuff.
Declarations of messages used by run-time monitoring and statistics.
Definition messages.hpp:36
Predefined prefixes of data-sources.
Definition std_names.hpp:23
SO_5_FUNC prefix_t mbox_repository()
Prefix of data sources with statistics for mboxes repository.
Definition std_names.cpp:28
Predefined suffixes of data-sources.
Definition std_names.hpp:55
SO_5_FUNC suffix_t named_mbox_count()
Suffix for data source with count of named mboxes.
Definition std_names.cpp:60
All stuff related to run-time monitoring and statistics.
Private part of message limit implementation.
Definition agent.cpp:33
void send(Target &&to, Args &&... args)
A utility function for creating and delivering a message or a signal.
std::size_t m_named_mbox_count
Count of named mboxes.
Definition mbox_core.hpp:51
A message with value of some quantity.
Definition messages.hpp:60