GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MON / V0-3-1 > mon_unit_test / rhel4-32


Interface   Data Structures   File List   Data Fields   Globals  

mon_test_perf.c File Reference

Test the MON package performance monitor functions. More...

#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.


Detailed Description

Test the MON package performance monitor functions.

**  CVS $Id: mon_test_perf.c,v 1.7 2011/03/28 23:52:02 russell Exp $
**  

Function Documentation

int mon_collect_perf_stats_wrap ( test_Test_Descriptor td_p,
int  id,
mon_Perf_Info info_p 
) [static]

int mon_initialize_wrap ( test_Test_Descriptor td_p,
int  id,
mon_Perf_Info info_p 
) [static]

Call MON_initialize() and validate the results.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to perf test state.
Return values:
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.

Parameters:
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.
Returns:
Nothing.

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.

Parameters:
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.
Returns:
Nothing.

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.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to perf test state.
Return values:
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.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to perf test state.
Return values:
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.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to perf test state.
Return values:
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.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to perf test state.
Return values:
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.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to perf test state.
Return values:
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 
)


Generated on Fri Sep 30 18:56:22 2011 by  doxygen 1.5.8