static bs_status bsmod_stat_cleanup | ( | void | ) | [static] |
Cleanup the stat module by destroying its memory pool
Definition at line 83 of file bsmod_stat.c.
References BS_OK, delete_list(), pool, and timers.
Here is the call graph for this function:
static bs_status bsmod_stat_handle_avgminmax | ( | const bs_service_request * | request, | |
bs_service_response ** | response | |||
) | [static] |
Definition at line 55 of file stat_functions.c.
References BS_ERROR, BS_OK, BS_UINT64_FMT, create_error_response(), bs_part_instance::data, data, bs_service_request::input, list_index(), list_size(), lock_bsmod_stat_mux(), max(), min(), new_bs_data_type(), new_bs_message_instance(), new_bs_part_instance(), new_bs_service_response(), new_list(), bs_message_instance::num_parts, bs_service_request::operation, bs_message_instance::parts, pool, bs_service_request::port, bs_service_request::service, streq(), strtokenize(), timers, unlock_bsmod_stat_mux(), and bs_service_request::uuid.
Referenced by bsmod_stat_handle_stat_functions().
Here is the call graph for this function:
static bs_status bsmod_stat_handle_gather_times | ( | const bs_service_request * | request, | |
bs_service_response ** | response | |||
) | [static] |
Definition at line 138 of file time_functions.c.
References BS_ERROR, BS_OK, create_error_response(), bs_part_instance::data, data, bs_service_request::input, list_index(), list_size(), lock_bsmod_stat_mux(), new_bs_data_type(), new_bs_message_instance(), new_bs_part_instance(), new_bs_service_response(), bs_message_instance::num_parts, bs_service_request::operation, bs_message_instance::parts, pool, bs_service_request::port, bs_service_request::service, streq(), timers, unlock_bsmod_stat_mux(), and bs_service_request::uuid.
Referenced by bsmod_stat_handle_time_functions().
Here is the call graph for this function:
static bs_status bsmod_stat_handle_service | ( | const bs_service_request * | request, | |
bs_service_response ** | response, | |||
void * | extra | |||
) | [static] |
Service handling routine. Since the keystroke module doesn't offer any services, it will return BS_NO_SERVICE on all occasions.
Definition at line 96 of file bsmod_stat.c.
References BS_ERROR, BS_NO_SERVICE, bsmod_stat_handle_stat_functions(), bsmod_stat_handle_time_functions(), bs_service_request::port, bs_service_request::service, and streq().
Here is the call graph for this function:
static bs_status bsmod_stat_handle_start_timer | ( | const bs_service_request * | request, | |
bs_service_response ** | response | |||
) | [static] |
Definition at line 55 of file time_functions.c.
References BS_ERROR, BS_OK, create_void_message(), bs_part_instance::data, bs_service_request::input, list_append(), list_index(), list_size(), lock_bsmod_stat_mux(), bs_message_instance::num_parts, bs_message_instance::parts, pool, timer_info::start, streq(), timer_info::timer_id, timers, and unlock_bsmod_stat_mux().
Referenced by bsmod_stat_handle_time_functions().
Here is the call graph for this function:
bs_status bsmod_stat_handle_stat_functions | ( | const bs_service_request * | request, | |
bs_service_response ** | response | |||
) |
Handle the statistics related operations for the stat module.
request | The request to be serviced | |
response | The result pointer to the response to be generated |
Definition at line 135 of file stat_functions.c.
References BS_NO_SERVICE, bsmod_stat_handle_avgminmax(), bs_service_request::operation, and streq().
Referenced by bsmod_stat_handle_service().
Here is the call graph for this function:
static bs_status bsmod_stat_handle_stop_timer | ( | const bs_service_request * | request, | |
bs_service_response ** | response | |||
) | [static] |
Definition at line 93 of file time_functions.c.
References BS_ERROR, BS_OK, BS_UINT64_FMT, create_error_response(), create_void_message(), bs_part_instance::data, bs_service_request::input, list_index(), list_size(), lock_bsmod_stat_mux(), bs_message_instance::num_parts, bs_message_instance::parts, pool, streq(), timers, and unlock_bsmod_stat_mux().
Referenced by bsmod_stat_handle_time_functions().
Here is the call graph for this function:
bs_status bsmod_stat_handle_time_functions | ( | const bs_service_request * | request, | |
bs_service_response ** | response | |||
) |
Handle the timing operations for the bsmod_stat module.
request | The request to be serviced | |
response | The result pointer to the response to be generated |
Definition at line 189 of file time_functions.c.
References BS_NO_SERVICE, bsmod_stat_handle_gather_times(), bsmod_stat_handle_start_timer(), bsmod_stat_handle_stop_timer(), bs_service_request::operation, and streq().
Referenced by bsmod_stat_handle_service().
Here is the call graph for this function:
static bs_status bsmod_stat_init | ( | void | ) | [static] |
Initialize the statistics module by creating a UUID for it.
Definition at line 66 of file bsmod_stat.c.
References BS_NO_MEMORY, init_bsmod_stat_mux(), new_list(), pool, runtestsuite::rv, and timers.
Here is the call graph for this function:
bs_service_response* create_error_response | ( | const bs_service_request * | request, | |
bs_status | code, | |||
const char * | description, | |||
apr_pool_t * | mp | |||
) |
Allocate and create a nice BSModStatFaultMessage from the given memory pool. Most functions in the bsmod_stat module return this kind of fault message.
request | The request that was to be serviced | |
code | The status code of the failed function | |
description | An accompanying description of the fault | |
mp | The memory pool from which everything is allocated |
Definition at line 75 of file general.c.
References new_bs_data_type(), new_bs_message_instance(), new_bs_part_instance(), new_bs_service_response(), bs_service_request::operation, bs_message_instance::parts, bs_service_request::port, bs_service_request::service, and bs_service_request::uuid.
Referenced by bsmod_stat_handle_avgminmax(), bsmod_stat_handle_gather_times(), and bsmod_stat_handle_stop_timer().
Here is the call graph for this function:
bs_service_response* create_void_message | ( | const bs_service_request * | request, | |
apr_pool_t * | mp | |||
) |
Create a void message.
Definition at line 103 of file general.c.
References new_bs_message_instance(), new_bs_service_response(), bs_service_request::operation, bs_service_request::port, bs_service_request::service, and bs_service_request::uuid.
Referenced by bsmod_stat_handle_start_timer(), and bsmod_stat_handle_stop_timer().
Here is the call graph for this function:
bs_status init_bsmod_stat_mux | ( | void | ) |
Create the module's mutexes.
Definition at line 54 of file general.c.
References BS_ERROR, BS_OK, mux, pool, and runtestsuite::rv.
Referenced by bsmod_stat_init().
void lock_bsmod_stat_mux | ( | void | ) | [inline] |
Lock the mutex associated with the module. Use this function before using the module's pool variable.
Definition at line 63 of file general.c.
References mux.
Referenced by bsmod_stat_handle_avgminmax(), bsmod_stat_handle_gather_times(), bsmod_stat_handle_start_timer(), and bsmod_stat_handle_stop_timer().
void unlock_bsmod_stat_mux | ( | void | ) | [inline] |
Unlock the mutex associated with the module. Use this function after using the module's pool variable.
Definition at line 69 of file general.c.
References mux.
Referenced by bsmod_stat_handle_avgminmax(), bsmod_stat_handle_gather_times(), bsmod_stat_handle_start_timer(), and bsmod_stat_handle_stop_timer().
Initial value:
{ 0, 0, 0, 1, "statistics module", "M.A.Hartman", "apr 30, 2007", "(c) 2007, M.A.Hartman. See distributed LICENSE file for more information.", "A module which offers various timing and statistics functions. " "This is particularly useful to measure performance of the Bio-SPHERE " "platform and its various modules.", bsmod_stat_init, bsmod_stat_cleanup, bsmod_stat_handle_service, NULL, "bsmod_stat.wsdl" }
Definition at line 115 of file bsmod_stat.c.
We keep timers for different clients.
Definition at line 53 of file bsmod_stat.c.
apr_thread_mutex_t* mux [static] |
Mutex for bsmod_stat's memory pool.
Definition at line 49 of file general.c.
Referenced by init_bsmod_stat_mux(), lock_bsmod_stat_mux(), and unlock_bsmod_stat_mux().
apr_pool_t* pool |
The private memory pool used by the stat module.
Definition at line 58 of file bsmod_stat.c.
Referenced by bsmod_stat_cleanup(), bsmod_stat_handle_avgminmax(), bsmod_stat_handle_gather_times(), bsmod_stat_handle_start_timer(), bsmod_stat_handle_stop_timer(), bsmod_stat_init(), handle_service_request(), init_bsmod_stat_mux(), new_dict(), new_list(), new_stack(), and strtokenize().
apr_pool_t* pool |
The private memory pool used by the stat module.
Definition at line 58 of file bsmod_stat.c.
apr_pool_t* pool |
The private memory pool used by the stat module.
Definition at line 58 of file bsmod_stat.c.
Referenced by bsmod_stat_cleanup(), bsmod_stat_handle_avgminmax(), bsmod_stat_handle_gather_times(), bsmod_stat_handle_start_timer(), bsmod_stat_handle_stop_timer(), bsmod_stat_init(), handle_service_request(), init_bsmod_stat_mux(), new_dict(), new_list(), new_stack(), and strtokenize().
Definition at line 60 of file bsmod_stat.c.
Referenced by bsmod_stat_cleanup(), bsmod_stat_handle_avgminmax(), bsmod_stat_handle_gather_times(), bsmod_stat_handle_start_timer(), bsmod_stat_handle_stop_timer(), and bsmod_stat_init().
Definition at line 60 of file bsmod_stat.c.
Referenced by bsmod_stat_cleanup(), bsmod_stat_handle_avgminmax(), bsmod_stat_handle_gather_times(), bsmod_stat_handle_start_timer(), bsmod_stat_handle_stop_timer(), and bsmod_stat_init().