CUBRID Engine  latest
broker_log_top_tran.c File Reference
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include "cas_common.h"
#include "broker_log_top.h"
#include "log_top_string.h"
#include "broker_log_util.h"
Include dependency graph for broker_log_top_tran.c:

Go to the source code of this file.

Classes

struct  t_log_info
 

Macros

#define TRAN_LOG_MAX_COUNT   1000
 
#define LOG_TOP_RES_FILE_TRAN   "log_top.t"
 

Typedefs

typedef struct t_log_info T_LOG_INFO
 

Functions

static int log_top (FILE *fp, char *filename, long start_offset, long end_offset)
 
static int info_delete (T_LOG_INFO *info)
 
static void print_result (void)
 
static int info_add (T_LOG_INFO *info, char *start_date, char *end_date)
 
int log_top_tran (int argc, char *argv[], int arg_start)
 

Variables

static int info_arr_size = 0
 
static int info_arr_max_size = TRAN_LOG_MAX_COUNT
 
static T_LOG_INFO info_arr [TRAN_LOG_MAX_COUNT+1]
 

Macro Definition Documentation

#define LOG_TOP_RES_FILE_TRAN   "log_top.t"

Definition at line 37 of file broker_log_top_tran.c.

Referenced by print_result().

#define TRAN_LOG_MAX_COUNT   1000

Definition at line 36 of file broker_log_top_tran.c.

Referenced by print_result().

Typedef Documentation

typedef struct t_log_info T_LOG_INFO

Definition at line 39 of file broker_log_top_tran.c.

Function Documentation

static int info_add ( T_LOG_INFO info,
char *  start_date,
char *  end_date 
)
static

Definition at line 248 of file broker_log_top_tran.c.

References check_log_time(), FREE_MEM, i, info_arr_max_size, info_arr_size, info_delete(), t_log_info::logstr, and t_log_info::runtime.

Referenced by log_top().

Here is the caller graph for this function:

static int info_delete ( T_LOG_INFO info)
static

Definition at line 278 of file broker_log_top_tran.c.

References info_arr_size, and t_log_info::runtime.

Referenced by info_add(), and print_result().

Here is the caller graph for this function:

static int log_top ( FILE *  fp,
char *  filename,
long  start_offset,
long  end_offset 
)
static
int log_top_tran ( int  argc,
char *  argv[],
int  arg_start 
)

Definition at line 56 of file broker_log_top_tran.c.

References argc, error(), get_file_offset(), i, info_arr_size, log_top(), LT_INVAILD_VERSION, NULL, and print_result().

Referenced by main().

Here is the caller graph for this function:

static void print_result ( void  )
static

Definition at line 216 of file broker_log_top_tran.c.

References FREE_MEM, i, info_delete(), LOG_TOP_RES_FILE_TRAN, t_log_info::logstr, NULL, and TRAN_LOG_MAX_COUNT.

Referenced by log_top_tran().

Here is the caller graph for this function:

Variable Documentation

T_LOG_INFO info_arr[TRAN_LOG_MAX_COUNT+1]
static

Definition at line 53 of file broker_log_top_tran.c.

int info_arr_max_size = TRAN_LOG_MAX_COUNT
static

Definition at line 52 of file broker_log_top_tran.c.

Referenced by info_add().

int info_arr_size = 0
static

Definition at line 51 of file broker_log_top_tran.c.

Referenced by info_add(), info_delete(), and log_top_tran().