45 FORCE_THREAD_ALWAYS_ALIVE =
true;
55 "Counter_start_thread",
"Timer_start_thread"),
57 "Counter_create_context",
"Timer_create_context"),
59 "Counter_execute_task",
"Timer_execute_task"),
61 "Counter_retire_task",
"Timer_retire_task"),
63 "Counter_found_task_in_queue",
"Timer_found_task_in_queue"),
65 "Counter_wakeup_with_task",
"Timer_wakeup_with_task"),
67 "Counter_recycle_context",
"Timer_recycle_context"),
69 "Counter_retire_context",
"Timer_retire_context")
115 std::size_t
count = std::thread::hardware_concurrency ();
136 std::stringstream ss;
138 ss <<
"Worker pool statistics: " << header << std::endl;
143 ss << statsp[
index] << std::endl;
146 std::string str = ss.str ();
static const cubperf::stat_id Wpstat_recycle_context
static const cubperf::stat_id Wpstat_start_thread
std::size_t wp_worker_statset_get_count(void)
void wp_er_log_stats(const char *header, cubperf::stat_value *statsp)
void time_and_increment(statset &statsetr, stat_id id, duration d, stat_value incr=1) const
void wp_worker_statset_destroy(cubperf::statset &stats)
generic_value< false > stat_value
void wp_set_force_thread_always_alive()
void wp_worker_statset_time_and_increment(cubperf::statset &stats, cubperf::stat_id id)
void _er_log_debug(const char *file_name, const int line_no, const char *fmt,...)
static const cubperf::stat_id Wpstat_create_context
static const cubperf::stat_id Wpstat_wakeup_with_task
static const cubperf::stat_id Wpstat_found_in_queue
std::size_t get_value_count() const
statset * create_statset(void) const
static const cubperf::stat_id Wpstat_retire_context
void add_stat_values_with_converted_timers(const statset &statsetr, stat_value *output_stats) const
static const cubperf::stat_id Wpstat_retire_task
static bool FORCE_THREAD_ALWAYS_ALIVE
static const cubperf::statset_definition Worker_pool_statdef
const char * wp_worker_statset_get_name(std::size_t stat_index)
bool wp_is_thread_always_alive_forced()
std::size_t system_core_count(void)
int count(int &result, const cub_regex_object ®, const std::string &src, const int position, const INTL_CODESET codeset)
void er_print_callstack(const char *file_name, const int line_no, const char *fmt,...)
void wp_handle_system_error(const char *message, const std::system_error &e)
const char * get_value_name(std::size_t value_index) const
cubperf::statset & wp_worker_statset_create(void)
static const cubperf::stat_id Wpstat_execute_task
void wp_worker_statset_accumulate(const cubperf::statset &what, cubperf::stat_value *where)