File cas_runner.c
FileList > broker > cas_runner.c
Go to the source code of this file
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <signal.h>
#include <math.h>
#include <pthread.h>
#include <unistd.h>
#include "cubrid_getopt.h"
#include "cas_common.h"
#include "porting.h"
#include "cas_cci.h"
#include "broker_log_util.h"
Classes
Public Types
Public Attributes
Public Static Attributes
Public Functions
Public Static Functions
| Type |
Name |
| double |
calc_avg (double * t, int count)
|
| void |
calc_min_max (double * t, int count, double * min, double * max)
|
| double |
calc_stddev (double * t, double avg, int count)
|
| void |
cas_runner (FILE * fp, FILE * result_fp, double * ret_exec_time, double * ret_prepare_time)
|
| void |
free_node (T_NODE_INFO * node)
|
| int |
get_args (int argc, char * argv)
|
| int |
ignore_error (int code)
|
| int |
make_node_info (T_NODE_INFO * node, char * node_name, char * info_str)
|
| char * |
make_sql_stmt (char * src)
|
| void |
print_result (int cci_res, int req_id, FILE * fp)
|
| int |
process_bind (char * msg, int * num_bind_p, T_BIND_INFO * bind_info, int bind_len)
|
| int |
process_close_req (char * linebuf, int * req_h, FILE * result_fp)
|
| int |
process_endtran (int con_h, int * req_h, FILE * result_fp)
|
| int |
process_execute (char * msg, int * req_h, int num_bind, T_BIND_INFO * bind_info, FILE * result_fp, double * sum_execute_time)
|
| int |
read_conf (void)
|
| int |
set_args_with_node_info (char * node_name)
|
| void * |
thr_main (void * arg)
|
Macros
| Type |
Name |
| define |
FREE_BIND_INFO (NUM_BIND, BIND_INFO) /* multi line expression */
|
| define |
MAX_IGN_SRV_ERR 100
|
| define |
MAX_NODE_INFO 100
|
| define |
PRINT_CCI_ERROR (ERRCODE, CCI_ERROR, result_fp)
|
| define |
SERVER_HANDLE_ALLOC_SIZE ([**MAX\_SERVER\_H\_ID**](cas__common_8h.md#define-max_server_h_id) + 1)
|
| define |
SLEEP_MILISEC (sec, msec) /* multi line expression */
|
| define |
SLEEP_SEC (X) [**sleep**](broker__monitor_8c.md#function-timeout)([**X**](broker__monitor_8c.md#function-timeout))
|
| define |
STRDUP (TARGET, SOURCE) /* multi line expression */
|
| define |
THREAD_FUNC [**void**](broker__monitor_8c.md#function-timeout)\*
|
Public Types Documentation
typedef T_BIND_INFO
typedef struct t_bind_info T_BIND_INFO;
typedef T_NODE_INFO
typedef struct t_node_info T_NODE_INFO;
Public Attributes Documentation
variable cci_client_name
const char* cci_client_name;
Public Static Attributes Documentation
variable autocommit_mode
variable batch_mode
variable broker_host
variable broker_port
variable cas_err_file
variable cas_error_flag
variable cas_error_fp
variable cubrid_manager_run
variable dbname
variable dbpasswd
variable dbuser
variable dump_query_plan
variable exec_script_file
variable fork_delay
variable ign_srv_err_list
int ign_srv_err_list[100];
variable node_name
variable node_table
T_NODE_INFO node_table[100];
variable num_ign_srv_err
variable num_node
variable num_replica
variable num_thread
variable qa_test_flag
variable repeat_count
variable result_file
variable run_time_exec
variable statdump_mode
variable think_time
Public Functions Documentation
function main
int main (
int argc,
char * argv
)
Public Static Functions Documentation
function calc_avg
static double calc_avg (
double * t,
int count
)
function calc_min_max
static void calc_min_max (
double * t,
int count,
double * min,
double * max
)
function calc_stddev
static double calc_stddev (
double * t,
double avg,
int count
)
function cas_runner
static void cas_runner (
FILE * fp,
FILE * result_fp,
double * ret_exec_time,
double * ret_prepare_time
)
function free_node
static void free_node (
T_NODE_INFO * node
)
function get_args
static int get_args (
int argc,
char * argv
)
function ignore_error
static int ignore_error (
int code
)
function make_node_info
static int make_node_info (
T_NODE_INFO * node,
char * node_name,
char * info_str
)
function make_sql_stmt
static char * make_sql_stmt (
char * src
)
function print_result
static void print_result (
int cci_res,
int req_id,
FILE * fp
)
function process_bind
static int process_bind (
char * msg,
int * num_bind_p,
T_BIND_INFO * bind_info,
int bind_len
)
function process_close_req
static int process_close_req (
char * linebuf,
int * req_h,
FILE * result_fp
)
function process_endtran
static int process_endtran (
int con_h,
int * req_h,
FILE * result_fp
)
function process_execute
static int process_execute (
char * msg,
int * req_h,
int num_bind,
T_BIND_INFO * bind_info,
FILE * result_fp,
double * sum_execute_time
)
function read_conf
static int read_conf (
void
)
function set_args_with_node_info
static int set_args_with_node_info (
char * node_name
)
function thr_main
static void * thr_main (
void * arg
)
Macro Definition Documentation
define FREE_BIND_INFO
#define FREE_BIND_INFO (
NUM_BIND,
BIND_INFO
) `/* multi line expression */`
define MAX_IGN_SRV_ERR
#define MAX_IGN_SRV_ERR `100`
define MAX_NODE_INFO
#define MAX_NODE_INFO `100`
define PRINT_CCI_ERROR
#define PRINT_CCI_ERROR (
ERRCODE,
CCI_ERROR,
result_fp
)
define SERVER_HANDLE_ALLOC_SIZE
#define SERVER_HANDLE_ALLOC_SIZE `( MAX_SERVER_H_ID + 1)`
define SLEEP_MILISEC
#define SLEEP_MILISEC (
sec,
msec
) `/* multi line expression */`
define SLEEP_SEC
#define SLEEP_SEC (
X
) `sleep ( X )`
define STRDUP
#define STRDUP (
TARGET,
SOURCE
) `/* multi line expression */`
define THREAD_FUNC
#define THREAD_FUNC `void *`
The documentation for this class was generated from the following file cubrid/src/broker/cas_runner.c