/usr/include/Yap/myddas_statistics.h is in yap 6.2.2-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | #ifndef __MYDDAS_STATISTICS_H__
#define __MYDDAS_STATISTICS_H__
#ifdef MYDDAS_STATS
#define MYDDAS_STATS_TIME_HOURS(TIME) TIME->u.time_final.hours;
#define MYDDAS_STATS_TIME_MINUTES(TIME) TIME->u.time_final.minutes;
#define MYDDAS_STATS_TIME_SECONDS(TIME) TIME->u.time_final.seconds;
#define MYDDAS_STATS_TIME_MILISECONDS(TIME) TIME->u.time_final.miliseconds;
#define MYDDAS_STATS_TIME_MICROSECONDS(TIME) TIME->u.time_final.microseconds;
#ifdef DEBUG
#define MYDDAS_STATS_PRINT_TIME_STRUCT(TIME) \
if (TIME->type == time_final) { \
printf ("%d Hours, %d Minutes, %d Seconds, %d Miliseconds, %d Microseconds", \
TIME->u.time_final.hours, \
TIME->u.time_final.minutes, \
TIME->u.time_final.seconds, \
TIME->u.time_final.miliseconds, \
TIME->u.time_final.microseconds); \
} else { \
printf ("%lu Seconds, %lu Microseconds", \
TIME->u.time_copy.tv_sec, \
TIME->u.time_copy.tv_usec); \
}
#endif
#define MYDDAS_STATS_INITIALIZE_TIME_STRUCT(TIME,TYPE) \
MYDDAS_MALLOC(TIME,struct myddas_stats_time_struct); \
\
if (TYPE == time_copy){ \
TIME->type = TYPE; \
TIME->u.time_copy.tv_sec = 0; \
TIME->u.time_copy.tv_usec = 0; \
} else { \
TIME->type = TYPE; \
TIME->u.time_final.hours = 0; \
TIME->u.time_final.minutes = 0; \
TIME->u.time_final.seconds = 0; \
TIME->u.time_final.miliseconds = 0; \
TIME->u.time_final.microseconds = 0; \
}
#define MYDDAS_STATS_CON_GET_TOTAL_TIME_DBSERVER(NODE,TIME) \
TIME = myddas_stats_get_stat(NODE->stats,1)->u.time_str.time_str;
#define MYDDAS_STATS_CON_GET_TOTAL_TIME_DBSERVER_COUNT(NODE,COUNT) \
COUNT = myddas_stats_get_stat(NODE->stats,1)->count;
#define MYDDAS_STATS_CON_SET_TOTAL_TIME_DBSERVER_COUNT(NODE,COUNT) \
myddas_stats_get_stat(NODE->stats,1)->count = COUNT;
#define MYDDAS_STATS_CON_GET_LAST_TIME_DBSERVER(NODE,TIME) \
TIME = myddas_stats_get_stat(NODE->stats,2)->u.time_str.time_str;
#define MYDDAS_STATS_CON_GET_LAST_TIME_DBSERVER_COUNT(NODE,COUNT) \
COUNT = myddas_stats_get_stat(NODE->stats,2)->count;
#define MYDDAS_STATS_CON_SET_LAST_TIME_DBSERVER_COUNT(NODE,COUNT) \
myddas_stats_get_stat(NODE->stats,2)->count = COUNT;
#define MYDDAS_STATS_CON_GET_TOTAL_TIME_TRANSFERING(NODE,TIME) \
TIME = myddas_stats_get_stat(NODE->stats,3)->u.time_str.time_str;
#define MYDDAS_STATS_CON_GET_TOTAL_TIME_TRANSFERING_COUNT(NODE,COUNT) \
COUNT = myddas_stats_get_stat(NODE->stats,3)->count;
#define MYDDAS_STATS_CON_SET_TOTAL_TIME_TRANSFERING_COUNT(NODE,COUNT) \
myddas_stats_get_stat(NODE->stats,3)->count = COUNT;
#define MYDDAS_STATS_CON_GET_LAST_TIME_TRANSFERING(NODE,TIME) \
TIME = myddas_stats_get_stat(NODE->stats,4)->u.time_str.time_str;
#define MYDDAS_STATS_CON_GET_LAST_TIME_TRANSFERING_COUNT(NODE,COUNT) \
COUNT = myddas_stats_get_stat(NODE->stats,4)->count;
#define MYDDAS_STATS_CON_SET_LAST_TIME_TRANSFERING_COUNT(NODE,COUNT) \
myddas_stats_get_stat(NODE->stats,4)->count = COUNT;
#define MYDDAS_STATS_CON_GET_TOTAL_ROWS(NODE,NUMBER) \
NUMBER = myddas_stats_get_stat(NODE->stats,5)->u.integer.integer;
#define MYDDAS_STATS_CON_SET_TOTAL_ROWS(NODE,NUMBER) \
myddas_stats_get_stat(NODE->stats,5)->u.integer.integer = NUMBER;
#define MYDDAS_STATS_CON_GET_TOTAL_ROWS_COUNT(NODE,COUNT) \
COUNT = myddas_stats_get_stat(NODE->stats,5)->count;
#define MYDDAS_STATS_CON_SET_TOTAL_ROWS_COUNT(NODE,COUNT) \
myddas_stats_get_stat(NODE->stats,5)->count = COUNT;
#define MYDDAS_STATS_CON_GET_TOTAL_BYTES_TRANSFERING_FROM_DBSERVER(NODE,NUMBER) \
NUMBER = myddas_stats_get_stat(NODE->stats,6)->u.integer.integer;
#define MYDDAS_STATS_CON_SET_TOTAL_BYTES_TRANSFERING_FROM_DBSERVER(NODE,NUMBER) \
myddas_stats_get_stat(NODE->stats,6)->u.integer.integer = NUMBER;
#define MYDDAS_STATS_CON_GET_TOTAL_BYTES_TRANSFERING_FROM_DBSERVER_COUNT(NODE,COUNT) \
COUNT = myddas_stats_get_stat(NODE->stats,6)->count;
#define MYDDAS_STATS_CON_SET_TOTAL_BYTES_TRANSFERING_FROM_DBSERVER_COUNT(NODE,COUNT) \
myddas_stats_get_stat(NODE->stats,6)->count = COUNT;
#define MYDDAS_STATS_CON_GET_LAST_BYTES_TRANSFERING_FROM_DBSERVER(NODE,NUMBER) \
NUMBER = myddas_stats_get_stat(NODE->stats,7)->u.integer.integer;
#define MYDDAS_STATS_CON_SET_LAST_BYTES_TRANSFERING_FROM_DBSERVER(NODE,NUMBER) \
myddas_stats_get_stat(NODE->stats,7)->u.integer.integer = NUMBER;
#define MYDDAS_STATS_CON_GET_LAST_BYTES_TRANSFERING_FROM_DBSERVER_COUNT(NODE,COUNT) \
COUNT = myddas_stats_get_stat(NODE->stats,7)->count;
#define MYDDAS_STATS_CON_SET_LAST_BYTES_TRANSFERING_FROM_DBSERVER_COUNT(NODE,COUNT) \
myddas_stats_get_stat(NODE->stats,7)->count = COUNT;
#define MYDDAS_STATS_CON_GET_NUMBER_QUERIES_MADE(NODE,NUMBER) \
NUMBER = myddas_stats_get_stat(NODE->stats,8)->u.integer.integer;
#define MYDDAS_STATS_CON_SET_NUMBER_QUERIES_MADE(NODE,NUMBER) \
myddas_stats_get_stat(NODE->stats,8)->u.integer.integer = NUMBER;
#define MYDDAS_STATS_CON_GET_NUMBER_QUERIES_MADE_COUNT(NODE,COUNT) \
COUNT = myddas_stats_get_stat(NODE->stats,8)->count;
#define MYDDAS_STATS_CON_SET_NUMBER_QUERIES_MADE_COUNT(NODE,COUNT) \
myddas_stats_get_stat(NODE->stats,8)->count = COUNT;
#define MYDDAS_STATS_GET_DB_ROW_FUNCTION(TIME) \
TIME = myddas_stats_get_stat(Yap_REGS.MYDDAS_GLOBAL_POINTER->myddas_statistics->stats,1)->u.time_str.time_str;
#define MYDDAS_STATS_GET_DB_ROW_FUNCTION_COUNT(COUNT) \
COUNT = myddas_stats_get_stat(Yap_REGS.MYDDAS_GLOBAL_POINTER->myddas_statistics->stats,1)->count;
#define MYDDAS_STATS_SET_DB_ROW_FUNCTION_COUNT(COUNT) \
myddas_stats_get_stat(Yap_REGS.MYDDAS_GLOBAL_POINTER->myddas_statistics->stats,1)->count = COUNT;
#define MYDDAS_STATS_GET_TRANSLATE(TIME) \
TIME = myddas_stats_get_stat(Yap_REGS.MYDDAS_GLOBAL_POINTER->myddas_statistics->stats,2)->u.time_str.time_str;
#define MYDDAS_STATS_GET_TRANSLATE_COUNT(COUNT) \
COUNT = myddas_stats_get_stat(Yap_REGS.MYDDAS_GLOBAL_POINTER->myddas_statistics->stats,2)->count;
#define MYDDAS_STATS_SET_TRANSLATE_COUNT(COUNT) \
myddas_stats_get_stat(Yap_REGS.MYDDAS_GLOBAL_POINTER->myddas_statistics->stats,2)->count = COUNT;
MYDDAS_STATS_TIME myddas_stats_walltime(void);
void myddas_stats_add_time(MYDDAS_STATS_TIME, MYDDAS_STATS_TIME,MYDDAS_STATS_TIME);
void myddas_stats_subtract_time(MYDDAS_STATS_TIME, MYDDAS_STATS_TIME,MYDDAS_STATS_TIME);
void myddas_stats_move_time(MYDDAS_STATS_TIME,MYDDAS_STATS_TIME);
MYDDAS_STATS_TIME myddas_stats_time_copy_to_final(MYDDAS_STATS_TIME);
/* Related to the statistics linked list */
MYDDAS_STATS_STRUCT myddas_stats_initialize_stat(MYDDAS_STATS_STRUCT,int);
MYDDAS_STATS_STRUCT myddas_stats_get_stat(MYDDAS_STATS_STRUCT,int);
#endif /* MYDDAS_STATS */
#endif
|