1 #ifndef LIBJMMCG_CORE_THREAD_STATISTICS_HPP
2 #define LIBJMMCG_CORE_THREAD_STATISTICS_HPP
24 #include <boost/graph/adjacency_list.hpp>
25 #include <boost/graph/graphviz.hpp>
40 struct process_work_type;
86 static_assert(
std::is_integral<
work_added_type>::value,
"The input type must be an integral type as defined in 3.9.1 of the Standard.");
88 class process_work_type;
93 : queue_stats(), vertical_work(), hrz_work(), colln_stats(), work_added() {
104 vertical_work.update(1);
110 return vertical_work;
124 queue_stats.update(l);
128 colln_stats.update(l);
135 os<<
_T(
"work added=")<<p.work_added
136 <<
_T(
", vertical work: ")<<p.vertical_work
137 <<
_T(
", horizontal work: ")<<p.hrz_work
138 <<
_T(
", pool-queue statistics: ")<<p.queue_stats
139 <<
_T(
", data-parallel collection statistics: ")<<p.colln_stats;
167 class add_cfg_details;
201 const typename atomic_t::read_lock_type lk(lock_,
atomic_t::lock_traits::infinite_timeout());
202 boost::write_graphviz(os, cfg_, boost::make_label_writer(vertex_names), boost::make_label_writer(edge_names));
227 vertex_names[main_]=
"main()";
238 const vertex_t v=boost::add_vertex(cfg_);
239 vertex_names[v]=details;
244 const std::pair<
edge_t,
bool> added_edge=boost::add_edge(u, v, cfg_);
245 edge_names[added_edge.first]=details;
249 return add_edge_nolk(main_, v, details);
253 typedef typename boost::graph_traits<container_type>::in_edge_iterator in_edge_iterator;
255 std::pair<in_edge_iterator, in_edge_iterator> edges=boost::in_edges(v, cfg_);
256 edge_names[*edges.first]=e_details;
259 typedef boost::property_map<container_type, boost::vertex_name_t>::type vertex_names_t;
260 typedef boost::property_map<container_type, boost::edge_name_t>::type edge_names_t;
263 vertex_names_t vertex_names;
264 edge_names_t edge_names;