CUBRID Engine
latest
|
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include "cas_common.h"
#include "cas_query_info.h"
#include "broker_log_sql_list.h"
#include "broker_log_top.h"
Go to the source code of this file.
Macros | |
#define | LOG_TOP_RES_FILE "log_top.res" |
#define | LOG_TOP_Q_FILE "log_top.q" |
#define | LOG_TOP_TAG_FILE "tags" |
#define | LOG_TOP_NE_FILE "log_top.ne" |
Functions | |
static int | sort_func (const void *arg1, const void *arg2) |
static char * | time2str (int t, char *buf) |
void | query_info_init (T_QUERY_INFO *qi) |
void | query_info_clear (T_QUERY_INFO *qi) |
void | query_info_print (void) |
int | query_info_add (T_QUERY_INFO *qi, int exec_time, int execute_res, char *filename, int lineno, char *end_date) |
int | query_info_add_ne (T_QUERY_INFO *qi, char *end_date) |
Variables | |
static T_QUERY_INFO * | query_info_arr = NULL |
static int | num_query_info = 0 |
#define LOG_TOP_NE_FILE "log_top.ne" |
Definition at line 42 of file cas_query_info.c.
Referenced by query_info_print().
#define LOG_TOP_Q_FILE "log_top.q" |
Definition at line 40 of file cas_query_info.c.
Referenced by query_info_print().
#define LOG_TOP_RES_FILE "log_top.res" |
Definition at line 39 of file cas_query_info.c.
Referenced by query_info_print().
#define LOG_TOP_TAG_FILE "tags" |
Definition at line 41 of file cas_query_info.c.
Referenced by query_info_print().
int query_info_add | ( | T_QUERY_INFO * | qi, |
int | exec_time, | ||
int | execute_res, | ||
char * | filename, | ||
int | lineno, | ||
char * | end_date | ||
) |
Definition at line 193 of file cas_query_info.c.
References t_query_info::cas_log, t_query_info::cas_log_len, check_log_time(), t_query_info::count, t_query_info::err_count, FREE_MEM, i, MALLOC, t_query_info::max, max, t_query_info::min, min, NULL, num_query_info, t_query_info::organized_sql, query_info_init(), REALLOC, t_query_info::sql, t_query_info::start_date, strdup(), strlen, and t_query_info::sum.
Referenced by log_top().
int query_info_add_ne | ( | T_QUERY_INFO * | qi, |
char * | end_date | ||
) |
Definition at line 273 of file cas_query_info.c.
References t_query_info::cas_log, check_log_time(), FREE_MEM, i, NULL, num_query_info, t_query_info::organized_sql, query_info_init(), REALLOC, t_query_info::sql, t_query_info::start_date, and strdup().
Referenced by log_top().
void query_info_clear | ( | T_QUERY_INFO * | qi | ) |
Definition at line 76 of file cas_query_info.c.
References t_query_info::cas_log, FREE_MEM, t_query_info::organized_sql, t_query_info::sql, and t_query_info::start_date.
Referenced by log_top().
void query_info_init | ( | T_QUERY_INFO * | qi | ) |
Definition at line 68 of file cas_query_info.c.
References t_query_info::max, and t_query_info::min.
Referenced by log_top(), query_info_add(), and query_info_add_ne().
void query_info_print | ( | void | ) |
Definition at line 85 of file cas_query_info.c.
References cubregex::count(), i, log_top_mode, LOG_TOP_NE_FILE, LOG_TOP_Q_FILE, LOG_TOP_RES_FILE, LOG_TOP_TAG_FILE, max, min, MODE_PROC_TIME, NULL, num_query_info, sort_func(), sql_info_write(), TEST, and time2str().
Referenced by log_top_query().
Definition at line 346 of file cas_query_info.c.
References max.
Referenced by query_info_print().
|
static |
Definition at line 352 of file cas_query_info.c.
Referenced by query_info_print().
|
static |
Definition at line 48 of file cas_query_info.c.
Referenced by query_info_add(), query_info_add_ne(), and query_info_print().
|
static |
Definition at line 47 of file cas_query_info.c.