GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MON / dev > mon_unit_test / rad750
#include <MON/MON_msgs.h>
#include <MON/MON_pubdefs.h>
#include <mon_test_perf.h>
#include <mon_unit_test.h>
#include <MSG/MSG_pubdefs.h>
#include <string.h>
Classes | |
struct | _mon_Perf_Info |
MON perf test state. More... | |
Typedefs | |
typedef struct _mon_Perf_Info | mon_Perf_Info |
Typedef for _mon_Perf_Info. | |
Functions | |
static int | mon_initialize_wrap (test_Test_Descriptor *td_p, int id, mon_Perf_Info *info_p) |
Call MON_initialize() and validate the results. | |
static int | mon_shutdown_wrap (test_Test_Descriptor *td_p, int id, mon_Perf_Info *info_p) |
Call MON_shutdown() and validate the results. | |
static int | mon_start_wrap (test_Test_Descriptor *td_p, int id, mon_Perf_Info *info_p) |
Call MON_start() and validate the results. | |
static int | mon_stop_wrap (test_Test_Descriptor *td_p, int id, mon_Perf_Info *info_p) |
Call MON_stop() and validate the results. | |
static int | mon_start_perf_mon_wrap (test_Test_Descriptor *td_p, int id, mon_Perf_Info *info_p) |
Call MON_start_perf_mon() and validate the results. | |
static int | mon_stop_perf_mon_wrap (test_Test_Descriptor *td_p, int id, mon_Perf_Info *info_p) |
Call MON_stop_perf_mon() and validate the results. | |
static int | mon_collect_perf_stats_wrap (test_Test_Descriptor *td_p, int id, mon_Perf_Info *info_p) |
Call MON_collect_perf_stats() and validate the results. | |
static void | mon_set_min_max (unsigned int count, unsigned int num_ms, unsigned int *min_p, unsigned int *max_p) |
Set min and max expected performance monitor statistics. | |
static void | mon_set_stats (MON_Perf_Stats *min_p, MON_Perf_Stats *max_p, unsigned int count_1, unsigned int count_2, unsigned int count_3, unsigned int count_4, unsigned int num_ms) |
Set min and max expected performance monitor statistics. | |
void | mon_test_perf (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Unit test for MON performance monitor functions. |
** CVS $Id: mon_test_perf.c,v 1.7 2011/03/28 23:52:02 russell Exp $ **
int mon_collect_perf_stats_wrap | ( | test_Test_Descriptor * | td_p, | |
int | id, | |||
mon_Perf_Info * | info_p | |||
) | [static] |
Call MON_collect_perf_stats() and validate the results.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. | |
info_p | Pointer to perf test state. |
0 | Success. | |
-1 | Failure. |
References _mon_Perf_Info::cb_parm, _mon_Perf_Info::exp_status, _mon_Perf_Info::max_stats, _mon_Perf_Info::min_stats, MON_collect_perf_stats(), _mon_Perf_Info::perf_cb, _mon_Perf_Info::perf_cb_parm, _mon_Perf_Info::perf_cfg, _mon_Perf_Info::perf_cfg_p, _mon_Perf_Info::perf_stats_p, _mon_Perf_Info::perf_time_us, test_Perf_Compare(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), test_Sleep_Sec(), test_Status_Compare(), and test_Value32_Compare().
Referenced by mon_test_control(), and mon_test_perf().
int mon_initialize_wrap | ( | test_Test_Descriptor * | td_p, | |
int | id, | |||
mon_Perf_Info * | info_p | |||
) | [static] |
Call MON_initialize() and validate the results.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. | |
info_p | Pointer to perf test state. |
0 | Success. | |
-1 | Failure. |
References _mon_Perf_Info::exp_status, MON_initialize(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().
void mon_set_min_max | ( | unsigned int | count, | |
unsigned int | num_ms, | |||
unsigned int * | min_p, | |||
unsigned int * | max_p | |||
) | [static] |
Set min and max expected performance monitor statistics.
count | Expected per-second counter value. | |
num_ms | Number of milliseconds of stats collection. | |
min_p | Pointer to min expected value. | |
max_p | Pointer to max expected value. |
Referenced by mon_set_stats().
void mon_set_stats | ( | MON_Perf_Stats * | min_p, | |
MON_Perf_Stats * | max_p, | |||
unsigned int | count_1, | |||
unsigned int | count_2, | |||
unsigned int | count_3, | |||
unsigned int | count_4, | |||
unsigned int | num_ms | |||
) | [static] |
Set min and max expected performance monitor statistics.
min_p | Pointer to buffer of min expected stats values. | |
max_p | Pointer to buffer of max expected stats values. | |
count_1 | Expected per-second counter 1 value. | |
count_2 | Expected per-second counter 2 value. | |
count_3 | Expected per-second counter 3 value. | |
count_4 | Expected per-second counter 4 value. | |
num_ms | Number of milliseconds of stats collection. |
References _MON_Perf_Stats::count_1, _MON_Perf_Stats::count_2, _MON_Perf_Stats::count_3, _MON_Perf_Stats::count_4, and mon_set_min_max().
Referenced by mon_test_loading(), and mon_test_perf().
int mon_shutdown_wrap | ( | test_Test_Descriptor * | td_p, | |
int | id, | |||
mon_Perf_Info * | info_p | |||
) | [static] |
Call MON_shutdown() and validate the results.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. | |
info_p | Pointer to perf test state. |
0 | Success. | |
-1 | Failure. |
References _mon_Perf_Info::exp_status, MON_shutdown(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().
int mon_start_perf_mon_wrap | ( | test_Test_Descriptor * | td_p, | |
int | id, | |||
mon_Perf_Info * | info_p | |||
) | [static] |
Call MON_start_perf_mon() and validate the results.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. | |
info_p | Pointer to perf test state. |
0 | Success. | |
-1 | Failure. |
References _mon_Perf_Info::exp_status, MON_start_perf_mon(), _mon_Perf_Info::perf_cfg_p, test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().
Referenced by mon_test_control(), and mon_test_perf().
int mon_start_wrap | ( | test_Test_Descriptor * | td_p, | |
int | id, | |||
mon_Perf_Info * | info_p | |||
) | [static] |
Call MON_start() and validate the results.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. | |
info_p | Pointer to perf test state. |
0 | Success. | |
-1 | Failure. |
References _mon_Perf_Info::exp_status, MON_start(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().
Referenced by mon_test_control(), mon_test_loading(), and mon_test_perf().
int mon_stop_perf_mon_wrap | ( | test_Test_Descriptor * | td_p, | |
int | id, | |||
mon_Perf_Info * | info_p | |||
) | [static] |
Call MON_stop_perf_mon() and validate the results.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. | |
info_p | Pointer to perf test state. |
0 | Success. | |
-1 | Failure. |
References _mon_Perf_Info::exp_status, _mon_Perf_Info::max_stats, _mon_Perf_Info::min_stats, MON_stop_perf_mon(), _mon_Perf_Info::perf_cfg, _mon_Perf_Info::perf_stats_p, test_Perf_Compare(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().
Referenced by mon_test_control(), and mon_test_perf().
int mon_stop_wrap | ( | test_Test_Descriptor * | td_p, | |
int | id, | |||
mon_Perf_Info * | info_p | |||
) | [static] |
Call MON_stop() and validate the results.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. | |
info_p | Pointer to perf test state. |
0 | Success. | |
-1 | Failure. |
References _mon_Perf_Info::exp_status, MON_stop(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().
void mon_test_perf | ( | test_Test_Descriptor * | td_p, | |
const unsigned int | bit_mask | |||
) |
Unit test for MON performance monitor functions.
td_p | Pointer to test descriptor. | |
bit_mask | Bitmask ID for this subtest. |
References _mon_Perf_Info::cb_parm, _MON_Perf_Config::event_1, _MON_Perf_Config::event_2, _MON_Perf_Config::event_3, _MON_Perf_Config::event_4, _test_Test_Descriptor::exec, _mon_Perf_Info::exp_status, _test_Test_Descriptor::fail, _mon_Perf_Info::max_stats, _mon_Perf_Info::min_stats, mon_collect_perf_stats_wrap(), MON_EVENT_1_BIT_TRANS, MON_EVENT_1_CYCLE, MON_EVENT_1_HOLD, MON_EVENT_1_INST_CMPLT, MON_EVENT_1_INST_DISPATCH, MON_EVENT_2_BIT_TRANS, MON_EVENT_2_CYCLE, MON_EVENT_2_HOLD, MON_EVENT_2_INST_CMPLT, MON_EVENT_2_INST_DISPATCH, MON_EVENT_3_BIT_TRANS, MON_EVENT_3_CYCLE, MON_EVENT_3_HOLD, MON_EVENT_3_INST_CMPLT, MON_EVENT_3_INST_DISPATCH, MON_EVENT_4_BIT_TRANS, MON_EVENT_4_CYCLE, MON_EVENT_4_HOLD, MON_EVENT_4_INST_CMPLT, MON_EVENT_4_INST_DISPATCH, mon_initialize_wrap(), MON_RTC_47, MON_RTC_51, MON_RTC_55, MON_RTC_63, mon_set_stats(), mon_shutdown_wrap(), mon_start_perf_mon_wrap(), mon_start_wrap(), mon_stop_perf_mon_wrap(), mon_stop_wrap(), _mon_Perf_Info::perf_cb, _mon_Perf_Info::perf_cb_parm, _mon_Perf_Info::perf_cfg, _mon_Perf_Info::perf_cfg_p, _mon_Perf_Info::perf_stats, _mon_Perf_Info::perf_stats_p, _mon_Perf_Info::perf_time_us, _MON_Perf_Config::rtc_select, test_Pop_State(), test_Push_State(), test_Sleep_Sec(), and _MON_Perf_Config::threshold.
Referenced by mon_unit_test().