SObjectizer  5.8
Loading...
Searching...
No Matches
thread_pool_stats.hpp
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 Reusable tools for run-time monitoring of thread-pool-like dispatchers.
11 */
12
13#pragma once
14
15#include <so_5/atomic_refcounted.hpp>
16
17#include <so_5/send_functions.hpp>
18
19#include <so_5/stats/repository.hpp>
20#include <so_5/stats/messages.hpp>
21#include <so_5/stats/std_names.hpp>
22
23#include <so_5/disp/reuse/data_source_prefix_helpers.hpp>
24
25namespace so_5 {
26
27namespace disp {
28
29namespace reuse {
30
31namespace thread_pool_stats {
32
33namespace stats = so_5::stats;
34
35/*!
36 * \since
37 * v.5.5.4
38 *
39 * \brief Description of one event queue.
40 */
42 {
43 //! Prefix for data-sources related to that queue.
45
46 //! Count of agents bound to that queue.
48
49 //! Current queue size.
51 };
52
53/*!
54 * \since
55 * v.5.5.4
56 *
57 * \brief A holder of one event queue information block.
58 *
59 * This holder must be allocated as dynamic object.
60 *
61 * There may be two references to it:
62 * - one (main reference) is in coresponding event queue object inside
63 * dispatcher. This reference will be destroyed with the event queue.
64 * It means that while the event queue exists there will be at least
65 * one reference to the holder;
66 * - second (temporary reference) is created only for data source update
67 * operation. This reference ensures that holder will not be destroyed
68 * while data source update operation is in progress (but the event queue
69 * could be destroyed).
70 *
71 * The most important thing about the holder is: actual value for
72 * m_next atribute must be set only during data source update operation,
73 * and must be dropped to nullptr after it.
74 */
76 {
78
79 //! Actual description for the event queue.
81
82 //! Next item in the chain of queues descriptions.
83 /*!
84 * Receives actual value only for small amount of time during
85 * data source update operation.
86 */
88 };
89
90/*!
91 * \since
92 * v.5.5.4
93 *
94 * \brief Typedef for smart pointer to queue_description.
95 */
96using queue_description_holder_ref_t =
98
99/*!
100 * \since
101 * v.5.5.4
102 *
103 * \brief Helper function for creating queue_description_holder object.
104 */
105inline queue_description_holder_ref_t
107 const stats::prefix_t & prefix,
108 coop_id_t coop_id,
109 std::size_t agent_count )
110 {
111 queue_description_holder_ref_t result( new queue_description_holder_t() );
112
113 std::ostringstream ss;
114 ss << prefix.c_str() << "/cq/" << coop_id;
115
116 result->m_desc.m_prefix = stats::prefix_t{ ss.str() };
117 result->m_desc.m_agent_count = agent_count;
118 result->m_desc.m_queue_size = 0;
119
120 return result;
121 }
122
123/*!
124 * \since
125 * v.5.5.4
126 *
127 * \brief Helper function for creating queue_description_holder object.
128 *
129 * Must be used for the case when agent uses individual FIFO.
130 */
131inline queue_description_holder_ref_t
133 const stats::prefix_t & prefix,
134 const void * agent )
135 {
136 queue_description_holder_ref_t result( new queue_description_holder_t() );
137
138 std::ostringstream ss;
139 ss << prefix.c_str() << "/aq/"
140 << so_5::disp::reuse::ios_helpers::pointer{ agent };
141
142 result->m_desc.m_prefix = stats::prefix_t{ ss.str() };
143 result->m_desc.m_agent_count = 1;
144 result->m_desc.m_queue_size = 0;
145
146 return result;
147 }
148
149/*!
150 * \since
151 * v.5.5.4
152 *
153 * \brief An interface of collector of information about thread-pool-like
154 * dispatcher state.
155 */
157 {
158 protected :
161
162 public :
163 //! Informs consumer about actual actual thread count.
164 virtual void
165 set_thread_count( std::size_t value ) = 0;
166
167 //! Informs counsumer about yet another event queue.
168 virtual void
170 const intrusive_ptr_t< queue_description_holder_t > & queue_desc ) = 0;
171
172 /*!
173 * \brief Informs consumer about yet another working thread
174 * activity.
175 *
176 * \note This method is called only if thread activity tracking
177 * is turned on.
178 */
179 virtual void
181 //! ID of working thread.
182 const so_5::current_thread_id_t & thread_id,
183 //! Statistics of working thread.
184 const so_5::stats::work_thread_activity_stats_t & stats ) = 0;
185 };
186
187/*!
188 * \since
189 * v.5.5.4
190 *
191 * \brief An interface of supplier of information about thread-pool-like
192 * dispatcher state.
193 *
194 * It is intended to be used as mixin for a dispatcher class.
195 */
197 {
198 protected :
199 // Just to make compilers happy.
200 virtual ~stats_supplier_t() {}
201
202 public :
203 virtual void
204 supply( stats_consumer_t & consumer ) = 0;
205 };
206
207/*!
208 * \since
209 * v.5.5.4
210 *
211 * \brief Type of data source for thread-pool-like dispatchers.
212 */
213class data_source_t : public stats::source_t
214 {
215 public :
216 //! Initializing constructor.
218 //! Supplier of statistical information.
219 stats_supplier_t & supplier )
220 : m_supplier( supplier )
221 {}
222
223 //! Setting of data-source basic name.
224 void
226 //! Type of the dispatcher.
227 //! Like 'tp' for thread-pool-dispatcher or
228 //! 'atp' for adv-thread-pool-dispatcher.
229 const std::string_view disp_type,
230 //! Optional name to be used as part of data-source prefix.
231 const std::string_view name_basic,
232 //! Pointer to the dispatcher object.
233 //! Will be used if \a name_basic is empty.
234 const void * disp_pointer )
235 {
236 m_prefix = make_disp_prefix( disp_type, name_basic, disp_pointer );
237 }
238
239 //! Distribution of statistical information.
240 void
242 const mbox_t & mbox ) override
243 {
244 // Collecting...
245 collector_t collector( m_wt_activity );
246 m_supplier.supply( collector );
247
248 // Distributing...
249 so_5::send< stats::messages::quantity< std::size_t > >(
250 mbox,
251 m_prefix,
252 stats::suffixes::disp_thread_count(),
253 collector.thread_count() );
254
255 so_5::send< stats::messages::quantity< std::size_t > >(
256 mbox,
257 m_prefix,
258 stats::suffixes::agent_count(),
259 collector.agent_count() );
260
261 collector.for_each_thread_activity(
262 [this, &mbox]( const so_5::current_thread_id_t & thread_id,
263 const so_5::stats::work_thread_activity_stats_t & stats ) {
264 so_5::send< stats::messages::work_thread_activity >(
265 mbox,
266 make_work_thread_prefix( thread_id ),
267 stats::suffixes::work_thread_activity(),
268 thread_id,
269 stats );
270 } );
271
272 collector.for_each_queue(
273 [&mbox]( const queue_description_t & queue ) {
274 so_5::send< stats::messages::quantity< std::size_t > >(
275 mbox,
276 queue.m_prefix,
277 stats::suffixes::agent_count(),
278 queue.m_agent_count );
279
280 so_5::send< stats::messages::quantity< std::size_t > >(
281 mbox,
282 queue.m_prefix,
283 stats::suffixes::work_thread_queue_size(),
284 queue.m_queue_size );
285 } );
286 }
287
288 //! Basic prefix for data source names.
289 const stats::prefix_t &
290 prefix() const
291 {
292 return m_prefix;
293 }
294
295 private :
296 /*!
297 * \brief Activity stats for a particular work thread.
298 * \since
299 * v.5.5.18
300 */
302 {
305
307 const so_5::current_thread_id_t & thread_id,
308 const stats::work_thread_activity_stats_t & stats )
310 , m_stats( stats )
311 {}
312 };
313
314 /*!
315 * \brief Type of storage for work thread activity info.
316 * \since
317 * v.5.5.18
318 */
321
322 //! Statistical information supplier.
324
325 //! Prefix for data-source names.
327
328 /*!
329 * \brief Container for collecting work activity stats
330 * from working threads.
331 *
332 * This container is stored in data_source itself and will
333 * be reused on each distribution cycle.
334 *
335 * \since
336 * v.5.5.18
337 */
339
340#if defined(__clang__)
341#pragma clang diagnostic push
342#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
343#endif
344
345 //! Actual type of statical information collector.
347 {
348 public :
350 //! Where to store thread activity stats.
351 wt_activity_info_container_t & wt_activity_holder )
353 {
354 // Old content must be reset.
355 m_wt_activity.clear();
356 }
357
359 {
360 // Chain of queue data sources must be cleaned up.
361 auto holder = m_queue_desc_head;
362 m_queue_desc_head.reset();
363
364 while( holder )
365 {
366 auto current = holder;
367 holder = holder->m_next;
368 current->m_next.reset();
369 }
370
371 m_queue_desc_tail.reset();
372 }
373
374 virtual void
376 std::size_t thread_count ) override
377 {
378 m_thread_count = thread_count;
379 }
380
381 virtual void
383 const intrusive_ptr_t< queue_description_holder_t > & info ) override
384 {
385 m_agent_count += info->m_desc.m_agent_count;
386
387 if( m_queue_desc_tail )
388 {
389 m_queue_desc_tail->m_next = info;
390 m_queue_desc_tail = info;
391 }
392 else
393 {
394 m_queue_desc_head = info;
395 m_queue_desc_tail = info;
396 }
397 }
398
399 virtual void
401 const so_5::current_thread_id_t & thread_id,
402 const stats::work_thread_activity_stats_t & stats )
403 override
404 {
405 m_wt_activity.emplace_back( thread_id, stats );
406 }
407
408 std::size_t
410 {
411 return m_thread_count;
412 }
413
414 std::size_t
416 {
417 return m_agent_count;
418 }
419
420 template< typename Lambda >
421 void
422 for_each_queue( Lambda lambda ) const
423 {
426
427 while( p )
428 {
429 lambda( p->m_desc );
430 p = p->m_next.get();
431 }
432 }
433
434 template< typename Lambda >
435 void
436 for_each_thread_activity( Lambda lambda ) const
437 {
438 for( const auto & wt : m_wt_activity )
440 }
441
442 private :
443
446
448
451 };
452
453#if defined(__clang__)
454#pragma clang diagnostic pop
455#endif
456
457 stats::prefix_t
458 make_work_thread_prefix( const so_5::current_thread_id_t & tid )
459 {
460 std::ostringstream ss;
461 ss << m_prefix << "/wt-"
462 << so_5::raw_id_from_current_thread_id( tid );
463
464 return stats::prefix_t{ ss.str() };
465 }
466 };
467
468} /* namespace thread_pool_stats */
469
470} /* namespace reuse */
471
472} /* namespace disp */
473
474} /* namespace so_5 */
#define SO_5_CHECK_INVARIANT(what, data)
A base class for agents.
Definition agent.hpp:673
The base class for the object with a reference counting.
Parameters for binding agents to adv_thread_pool dispatcher.
bind_params_t & fifo(fifo_t v)
Set FIFO type.
Alias for namespace with traits of event queue.
std::size_t thread_count() const
Getter for thread count.
disp_params_t & thread_count(std::size_t count)
Setter for thread count.
disp_params_t & tune_queue_params(L tunner)
Tuner for queue parameters.
std::size_t m_thread_count
Count of working threads.
queue_traits::queue_params_t m_queue_params
Queue parameters.
const queue_traits::queue_params_t & queue_params() const
Getter for queue parameters.
disp_params_t & set_queue_params(queue_traits::queue_params_t p)
Setter for queue parameters.
friend void swap(disp_params_t &a, disp_params_t &b) noexcept
A handle for adv_thread_pool dispatcher.
disp_binder_shptr_t binder(bind_params_t params) const
Get a binder for that dispatcher.
bool empty() const noexcept
Is this handle empty?
impl::basic_dispatcher_iface_shptr_t m_dispatcher
A reference to actual implementation of a dispatcher.
dispatcher_handle_t(impl::basic_dispatcher_iface_shptr_t dispatcher) noexcept
void bind(agent_t &agent) noexcept override
Bind agent to dispatcher.
const bind_params_t m_params
Binding parameters.
void unbind(agent_t &agent) noexcept override
Unbind agent from dispatcher.
actual_binder_t(actual_dispatcher_iface_shptr_t disp, bind_params_t params) noexcept
actual_dispatcher_iface_shptr_t m_disp
Dispatcher to be used.
void preallocate_resources(agent_t &agent) override
Allocate resources in dispatcher for new agent.
void undo_preallocation(agent_t &agent) noexcept override
Undo resources allocation.
virtual event_queue_t * query_resources_for_agent(agent_t &agent) noexcept=0
Get resources allocated for an agent.
virtual void undo_preallocation_for_agent(agent_t &agent) noexcept=0
Undo preallocation of resources for a new agent.
virtual void unbind_agent(agent_t &agent) noexcept=0
Unbind agent from the dispatcher.
virtual void preallocate_resources_for_agent(agent_t &agent, const bind_params_t &params)=0
Preallocate all necessary resources for a new agent.
event_queue_t * query_resources_for_agent(agent_t &agent) noexcept override
Get resources allocated for an agent.
void unbind_agent(agent_t &agent) noexcept override
Unbind agent from the dispatcher.
void undo_preallocation_for_agent(agent_t &agent) noexcept override
Undo preallocation of resources for a new agent.
actual_dispatcher_implementation_t(outliving_reference_t< environment_t > env, const std::string_view name_base, disp_params_t params)
dispatcher_template_t< Work_Thread > m_impl
Real dispatcher.
void preallocate_resources_for_agent(agent_t &agent, const bind_params_t &params) override
Preallocate all necessary resources for a new agent.
execution_demand_t peek_front()
Get the information about the front demand.
agent_queue_t * intrusive_queue_giveout_next() noexcept
Give away a pointer to the next agent_queue.
void push(execution_demand_t demand) override
Push next demand to queue.
std::size_t size() const noexcept
Get the current size of the queue.
agent_queue_t * m_intrusive_queue_next
The next item in intrusive queue of agent_queues.
void intrusive_queue_set_next(agent_queue_t *next) noexcept
Set a pointer to the next agent_queue.
agent_queue_t(outliving_reference_t< dispatcher_queue_t > disp_queue, const bind_params_t &)
Constructor.
bool worker_finished(unsigned int type_of_worker)
Signal about finishing of worker of the specified type.
void push_evt_finish(execution_demand_t demand) noexcept override
std::atomic< std::size_t > m_size
Current size of the queue.
bool is_there_not_thread_safe_worker() const
Check the presence of thread unsafe worker.
void delete_head() noexcept
Helper method for deleting queue's head object.
bool worker_started(unsigned int type_of_worker)
Remove the front demand.
spinlock_t & lock() noexcept
Access to the queue's lock.
void push_evt_start(execution_demand_t demand) override
bool is_there_any_worker() const
Check the presence of any worker at the moment.
The very basic interface of adv_thread_pool dispatcher.
virtual disp_binder_shptr_t binder(bind_params_t params)=0
static dispatcher_handle_t make(actual_dispatcher_iface_shptr_t disp) noexcept
no_activity_tracking_impl_t(outliving_reference_t< dispatcher_queue_t > queue, work_thread_holder_t thread_holder)
Initializing constructor.
so_5::stats::activity_tracking_stuff::stats_collector_t< so_5::stats::activity_tracking_stuff::external_lock<> > m_waiting_stats_collector
A collector for waiting stats.
with_activity_tracking_impl_t(outliving_reference_t< dispatcher_queue_t > queue, work_thread_holder_t thread_holder)
Initializing constructor.
so_5::stats::activity_tracking_stuff::stats_collector_t< so_5::stats::activity_tracking_stuff::external_lock<> > m_work_activity_collector
A collector for work activity.
void process_queue(agent_queue_t &queue)
Processing of demands from agent queue.
work_thread_template_t(outliving_reference_t< dispatcher_queue_t > queue, work_thread_holder_t thread_holder)
Initializing constructor.
agent_queue_t * pop_agent_queue() noexcept
An attempt of extraction of non-empty agent queue.
An interface for somethine like condition variable for waiting on MPMC queue lock.
Container for storing parameters for MPMC queue.
Multi-producer/Multi-consumer queue of pointers to event queues.
T * m_tail
The current tail of the intrusive queue.
T * try_switch_to_another(T *current) noexcept
Switch the current non-empty queue to another one if it is possible.
void try_wakeup_someone_if_possible() noexcept
An attempt to wakeup another sleeping thread if it's necessary and possible.
const std::size_t m_max_thread_count
Maximum count of working threads to be used with that mpmc_queue.
so_5::disp::mpmc_queue_traits::lock_unique_ptr_t m_lock
Object's lock.
std::size_t m_queue_size
The current size of the intrusive queue.
void schedule(T *queue) noexcept
Schedule execution of demands from the queue.
T * m_head
The current head of the intrusive queue.
queue_of_queues_t(const so_5::disp::mpmc_queue_traits::queue_params_t &queue_params, std::size_t thread_count)
void shutdown() noexcept
Initiate shutdown for working threads.
const std::size_t m_next_thread_wakeup_threshold
Threshold for wake up next working thread if there are non-empty agent queues.
so_5::disp::mpmc_queue_traits::condition_unique_ptr_t allocate_condition()
T * pop(so_5::disp::mpmc_queue_traits::condition_t &condition) noexcept
Get next active queue.
void push_to_queue(T *new_tail) noexcept
Helper method that pushes a new item to the end of the queue.
bool m_wakeup_in_progress
Is some working thread in wakeup process now?
T * pop_head() noexcept
Helper method that extracts the head item from the queue.
std::vector< so_5::disp::mpmc_queue_traits::condition_t * > m_waiting_customers
Waiting threads.
intrusive_ptr_t< queue_description_holder_t > m_queue_desc_head
collector_t(wt_activity_info_container_t &wt_activity_holder)
virtual void set_thread_count(std::size_t thread_count) override
Informs consumer about actual actual thread count.
virtual void add_work_thread_activity(const so_5::current_thread_id_t &thread_id, const stats::work_thread_activity_stats_t &stats) override
Informs consumer about yet another working thread activity.
virtual void add_queue(const intrusive_ptr_t< queue_description_holder_t > &info) override
Informs counsumer about yet another event queue.
intrusive_ptr_t< queue_description_holder_t > m_queue_desc_tail
Type of data source for thread-pool-like dispatchers.
wt_activity_info_container_t m_wt_activity
Container for collecting work activity stats from working threads.
data_source_t(stats_supplier_t &supplier)
Initializing constructor.
const stats::prefix_t & prefix() const
Basic prefix for data source names.
stats::prefix_t make_work_thread_prefix(const so_5::current_thread_id_t &tid)
stats::prefix_t m_prefix
Prefix for data-source names.
void distribute(const mbox_t &mbox) override
Distribution of statistical information.
void set_data_sources_name_base(const std::string_view disp_type, const std::string_view name_basic, const void *disp_pointer)
Setting of data-source basic name.
stats_supplier_t & m_supplier
Statistical information supplier.
An interface of collector of information about thread-pool-like dispatcher state.
virtual void add_work_thread_activity(const so_5::current_thread_id_t &thread_id, const so_5::stats::work_thread_activity_stats_t &stats)=0
Informs consumer about yet another working thread activity.
virtual void set_thread_count(std::size_t value)=0
Informs consumer about actual actual thread count.
virtual void add_queue(const intrusive_ptr_t< queue_description_holder_t > &queue_desc)=0
Informs counsumer about yet another event queue.
An interface of supplier of information about thread-pool-like dispatcher state.
virtual void supply(stats_consumer_t &consumer)=0
Mixin that holds optional work thread factory.
void undo_preallocation_for_agent(agent_t &agent) noexcept
Undo preallocation of resources for a new agent.
void preallocate_resources_for_agent(agent_t &agent, const Bind_Params &params)
Preallocate all necessary resources for a new agent.
void bind_agent_with_cooperation_fifo(agent_ref_t agent, const Bind_Params &params)
Creation event queue for an agent with individual FIFO.
void bind_agent_with_inidividual_fifo(agent_ref_t agent, const Bind_Params &params)
Creation event queue for an agent with individual FIFO.
virtual void supply(tp_stats::stats_consumer_t &consumer) override
Implementation of stats_supplier-related stuff.
tp_stats::stats_supplier_t & stats_supplier()
Helper method for casting to stats_supplier-object.
Dispatcher_Queue m_queue
Queue for active agent's queues.
event_queue_t * query_resources_for_agent(agent_t &agent) noexcept
Get resources allocated for an agent.
std::vector< std::unique_ptr< Work_Thread > > m_threads
Pool of work threads.
void unbind_agent(agent_t &agent) noexcept
Unbind agent from the dispatcher.
dispatcher_t(environment_t &env, const so_5::disp::reuse::work_thread_factory_mixin_t< Dispatcher_Params > &disp_params, const std::string_view name_base, std::size_t thread_count, const so_5::disp::mpmc_queue_traits::queue_params_t &queue_params)
Constructor.
agent_queue_ref_t make_new_agent_queue(const Bind_Params &params)
Helper method for creating event queue for agents/cooperations.
dispatcher_t & operator=(const dispatcher_t &)=delete
cooperation_map_t m_cooperations
Information about cooperations.
stats::manually_registered_source_holder_t< tp_stats::data_source_t > m_data_source
Data source for the run-time monitoring.
An analog of unique_ptr for abstract_work_thread.
Interface for dispatcher binders.
SObjectizer Environment.
An interface of event queue for agent.
Template class for smart reference wrapper on the atomic_refcounted_t.
Helper class for indication of long-lived reference via its type.
Definition outliving.hpp:98
An addition to auto_registered_source_holder for the cases where manual registration of data_source s...
A type for storing prefix of data_source name.
Definition prefix.hpp:32
An interface of data source.
#define SO_5_FUNC
Definition declspec.hpp:48
void adjust_thread_count(disp_params_t &params)
Sets the thread count to default value if used do not specify actual thread count.
Internal implementation details of advanced thread pool dispatcher.
Advanced thread pool dispatcher.
dispatcher_handle_t make_dispatcher(environment_t &env, const std::string_view data_sources_name_base, std::size_t thread_count)
Create an instance of adv_thread_pool dispatcher.
dispatcher_handle_t make_dispatcher(environment_t &env, std::size_t thread_count)
Create an instance of adv_thread_pool dispatcher.
dispatcher_handle_t make_dispatcher(environment_t &env)
Create an instance of adv_thread_pool dispatcher with the default count of work threads.
SO_5_FUNC dispatcher_handle_t make_dispatcher(environment_t &env, const std::string_view data_sources_name_base, disp_params_t params)
Create an instance of adv_thread_pool dispatcher.
fifo_t
Type of FIFO mechanism for agent's demands.
@ cooperation
A FIFO for demands for all agents from the same cooperation.
@ individual
A FIFO for demands only for one agent.
Various stuff related to MPMC event queue implementation and tuning.
Helper tools for implementation of run-time monitoring for thread-pool-like dispatchers.
queue_description_holder_ref_t make_queue_desc_holder(const stats::prefix_t &prefix, coop_id_t coop_id, std::size_t agent_count)
Helper function for creating queue_description_holder object.
queue_description_holder_ref_t make_queue_desc_holder(const stats::prefix_t &prefix, const void *agent)
Helper function for creating queue_description_holder object.
Reusable components for dispatchers.
std::size_t default_thread_pool_size()
A helper function for detecting default thread count for thread pool.
Reusable implementation of some thread pool dispatcher functionality which can be used in other threa...
Thread pool dispatcher.
Event dispatchers.
All stuff related to run-time monitoring and statistics.
Private part of message limit implementation.
Definition agent.cpp:33
Adaptation of common implementation of thread-pool-like dispatcher to the specific of this thread-poo...
static bool is_individual_fifo(const bind_params_t &params) noexcept
static constexpr std::string_view dispatcher_type_name() noexcept
static void wait_for_queue_emptyness(agent_queue_t &) noexcept
common_data_t(outliving_reference_t< dispatcher_queue_t > queue, work_thread_holder_t thread_holder)
so_5::disp::mpmc_queue_traits::condition_unique_ptr_t m_condition
Waiting object for long wait.
wt_activity_info_t(const so_5::current_thread_id_t &thread_id, const stats::work_thread_activity_stats_t &stats)
intrusive_ptr_t< queue_description_holder_t > m_next
Next item in the chain of queues descriptions.
queue_description_t m_desc
Actual description for the event queue.
stats::prefix_t m_prefix
Prefix for data-sources related to that queue.
std::size_t m_agent_count
Count of agents bound to that queue.
tp_stats::queue_description_holder_ref_t m_queue_desc
Description of that queue for run-time monitoring.
void update_queue_stats()
Update queue description with current information.
agent_data_t(agent_queue_ref_t queue, const stats::prefix_t &data_source_name_prefix, const agent_t *agent_ptr)
Constructor for the case when agent uses individual FIFO.
agent_data_t(agent_queue_ref_t queue)
Constructor for the case when agent uses cooperation FIFO.
tp_stats::queue_description_holder_ref_t m_queue_desc
Description of that queue for run-time monitoring.
cooperation_data_t(agent_queue_ref_t queue, std::size_t agents, const stats::prefix_t &data_source_name_prefix, coop_id_t coop_id)
A description of event execution demand.
Various traits of activity tracking implementation.