MYDDAS: Updates and BUGs corrections on myddas-statistics
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1533 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -5,26 +5,18 @@
|
||||
|
||||
struct myddas_global {
|
||||
MYDDAS_UTIL_CONNECTION myddas_top_connections;
|
||||
#ifdef MYDDAS_TOP_LEVEL
|
||||
MYDDAS_UTIL_CONNECTION myddas_top_level_connection;
|
||||
#endif
|
||||
#ifdef MYDDAS_STATS
|
||||
MYDDAS_GLOBAL_STATS myddas_statistics;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct myddas_table_integers {
|
||||
unsigned int number;
|
||||
struct myddas_table_integers *next;
|
||||
};
|
||||
|
||||
struct myddas_temp_tables{
|
||||
struct myddas_table_integers *table_numbers;
|
||||
struct myddas_table_integers *last_number;
|
||||
char *default_table_name;
|
||||
};
|
||||
|
||||
#ifdef MYDDAS_STATS
|
||||
/* This strucuture holds some global statistics*/
|
||||
struct myddas_global_stats {
|
||||
unsigned long total_db_row;
|
||||
MYDDAS_STATS_TIME total_db_row;
|
||||
};
|
||||
#endif /* MYDDAS_STATS */
|
||||
|
||||
@@ -38,8 +30,7 @@ struct myddas_list_preds {
|
||||
|
||||
struct myddas_list_connection {
|
||||
void *connection;
|
||||
MYDDAS_TEMP_TABLES temporary_tables;
|
||||
|
||||
|
||||
/*If variable env is NULL, then it's a
|
||||
MySQL connection, if not then it as the pointer
|
||||
to the ODBC enviromment variable */
|
||||
@@ -50,17 +41,17 @@ struct myddas_list_connection {
|
||||
|
||||
/* Total Time spent by the DataBase Server
|
||||
processing all querys */
|
||||
unsigned long totalTimeofDBServer;
|
||||
MYDDAS_STATS_TIME totalTimeofDBServer;
|
||||
/* Time spent by the DataBase Server, processing
|
||||
the last query */
|
||||
unsigned long lastTimeofDBServer;
|
||||
MYDDAS_STATS_TIME lastTimeofDBServer;
|
||||
|
||||
/* Total Time spent by the DataBase Server,
|
||||
transfering all the data to the client */
|
||||
unsigned long totalFromDBServer;
|
||||
MYDDAS_STATS_TIME totalFromDBServer;
|
||||
/* Time spent by the DataBase Server,
|
||||
transfering the data of the last query */
|
||||
unsigned long lastFromDBServer;
|
||||
MYDDAS_STATS_TIME lastFromDBServer;
|
||||
|
||||
/* Last bytes transfered from the server */
|
||||
unsigned long totalBytesTransfered;
|
||||
@@ -68,17 +59,19 @@ struct myddas_list_connection {
|
||||
unsigned long lastBytesTransfered;
|
||||
|
||||
/* Total Time spent on the db_row function */
|
||||
unsigned long total_db_row;
|
||||
MYDDAS_STATS_TIME total_db_row;
|
||||
|
||||
/* Number of querys made to the Server*/
|
||||
unsigned long total_querys_made;
|
||||
#endif
|
||||
MYDDAS_UTIL_PREDICATE predicates;
|
||||
|
||||
/*Multi Queries Section */
|
||||
/* Multi Queries Section */
|
||||
unsigned long total_number_queries;
|
||||
unsigned long actual_number_queries;
|
||||
MYDDAS_UTIL_QUERY *queries;
|
||||
|
||||
/* List Integrety */
|
||||
MYDDAS_UTIL_CONNECTION next;
|
||||
MYDDAS_UTIL_CONNECTION previous;
|
||||
};
|
||||
@@ -88,4 +81,26 @@ struct myddas_util_query{
|
||||
MYDDAS_UTIL_QUERY next;
|
||||
};
|
||||
|
||||
|
||||
#if defined MYDDAS_STATS || defined MYDDAS_TOP_LEVEL
|
||||
struct myddas_stats_time_struct{
|
||||
enum {time_copy,
|
||||
time_final} type;
|
||||
|
||||
union {
|
||||
struct {
|
||||
unsigned long tv_sec;
|
||||
unsigned long tv_usec;
|
||||
} time_copy;
|
||||
struct {
|
||||
unsigned short hours;
|
||||
unsigned short minutes; //Max 59
|
||||
unsigned short seconds; //Max 59
|
||||
unsigned short miliseconds; //Max 999
|
||||
unsigned short microseconds; //Max 999
|
||||
} time_final;
|
||||
} u;
|
||||
};
|
||||
#endif /* MYDDAS_STATS || MYDDAS_TOP_LEVEL */
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user