HomePort
Data Structures | Macros | Functions | Variables
load_test.c File Reference
Include dependency graph for load_test.c:

Go to the source code of this file.

Data Structures

struct  mt_args
 

Macros

#define NTHREADS   16
 

Functions

static int basic_get_contains_test (char *url, char *contains)
 
static int basic_get_multithreaded_stress_test (char *url, char *contains)
 
static void cleanup_libcurl ()
 
static void cleanup_tests ()
 
static size_t data_from_curl (char *buffer, size_t buffer_size, size_t nmemb, char **userdata)
 
static void exit_cb (EV_P_ ev_async *watcher, int revents)
 
static void exit_handler (int sig)
 
static void * get_mt_loop (void *args)
 
static void init_libcurl ()
 
static void init_tests ()
 
int main (int argc, char *argv[])
 
static int on_receive (hpd_ws_t *instance, hpd_ws_conn_t *conn, void *ctx, void **data, const char *buf, size_t len)
 
static void set_bad_multithreaded_result ()
 
static char * simple_get_request (char *url)
 
static int test_thread ()
 
static void * webserver_thread (void *arg)
 

Variables

static struct ev_async exit_watcher
 
static pthread_mutex_t lock
 
static struct ev_loop * loop
 
static int multithreaded_results
 
static int started = 0
 
static pthread_t threadID [NTHREADS]
 
static hpd_ws_t * ws = NULL
 

Data Structure Documentation

struct mt_args

Definition at line 38 of file load_test.c.

Collaboration diagram for mt_args:
Data Fields
unsigned long assaults
char * contains
char * url

Macro Definition Documentation

#define NTHREADS   16

Definition at line 36 of file load_test.c.

Function Documentation

static int basic_get_contains_test ( char *  url,
char *  contains 
)
static

Definition at line 107 of file load_test.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int basic_get_multithreaded_stress_test ( char *  url,
char *  contains 
)
static

Definition at line 148 of file load_test.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void cleanup_libcurl ( )
static

Definition at line 55 of file load_test.c.

Here is the caller graph for this function:

static void cleanup_tests ( )
static

Definition at line 102 of file load_test.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static size_t data_from_curl ( char *  buffer,
size_t  buffer_size,
size_t  nmemb,
char **  userdata 
)
static

Definition at line 60 of file load_test.c.

Here is the caller graph for this function:

static void exit_cb ( EV_P_ ev_async *  watcher,
int  revents 
)
static

Definition at line 229 of file load_test.c.

Here is the caller graph for this function:

static void exit_handler ( int  sig)
static

Definition at line 223 of file load_test.c.

Here is the caller graph for this function:

static void* get_mt_loop ( void *  args)
static

Definition at line 132 of file load_test.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void init_libcurl ( )
static

Definition at line 50 of file load_test.c.

Here is the caller graph for this function:

static void init_tests ( )
static

Definition at line 97 of file load_test.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

Definition at line 275 of file load_test.c.

Here is the call graph for this function:

static int on_receive ( hpd_ws_t *  instance,
hpd_ws_conn_t *  conn,
void *  ctx,
void **  data,
const char *  buf,
size_t  len 
)
static

Definition at line 210 of file load_test.c.

Here is the caller graph for this function:

static void set_bad_multithreaded_result ( )
static

Definition at line 125 of file load_test.c.

Here is the caller graph for this function:

static char* simple_get_request ( char *  url)
static

Definition at line 69 of file load_test.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int test_thread ( )
static

Definition at line 178 of file load_test.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void* webserver_thread ( void *  arg)
static

Definition at line 241 of file load_test.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

struct ev_async exit_watcher
static

Definition at line 220 of file load_test.c.

pthread_mutex_t lock
static

Definition at line 45 of file load_test.c.

struct ev_loop* loop
static

Definition at line 219 of file load_test.c.

int multithreaded_results
static

Definition at line 44 of file load_test.c.

int started = 0
static

Definition at line 47 of file load_test.c.

pthread_t threadID[NTHREADS]
static

Definition at line 46 of file load_test.c.

hpd_ws_t* ws = NULL
static

Definition at line 48 of file load_test.c.